<div dir="ltr"><div dir="ltr"><div>On Tue, Jan 19, 2021 at 7:28 AM Roland Richter <<a href="mailto:roland.richter@ntnu.no">roland.richter@ntnu.no</a>> wrote:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  

    
  
  <div>
    <p>Hei,</p>
    <p>I just encountered an issue which I can not solve on my own. I
      wrote a test program on my development machine, and compilation
      works fine, but when trying to compile it on the production
      machine compilation fails with</p>
    <p><i></i></p></div></blockquote><div>I believe your production machine has PETSc version < 3.14, since MatDenseGetArrayWrite() was not introduced until 3,14.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><p><i>[ 25%] Building CXX object
        CMakeFiles/test_program.dir/source/core/tester_helper.cpp.o</i><i><br>
      </i><i>/share/apps/software/OpenMPI/3.1.3-gcccuda-2019a/bin/mpicxx
        -DBOOST_NO_AUTO_PTR -DUSE_CUDA -DUSE_PHYSICS_VARIABLES
        -Dtest_program_EXPORTS
        -I~/work_directory/full_physics/Test-Controller/library/include
        -I~/work_directory/full_physics/physics_variables/include
        -I~/local_opt_GCC7/interp2d/include -I/usr/include/eigen3
        -I/share/apps/software/Compiler/GCC/8.2.0-2.31.1/GSL/2.5/include
-I/share/apps/software/MPI/intel/2018.3.222-GCC-7.3.0-2.30/impi/2018.3.222/imkl/2018.3.222/compilers_and_libraries_2018.3.222/linux/mkl/include
        -isystem ~/local_opt_GCC7/dealii/include -isystem
        ~/local_opt_GCC7/dealii/include/deal.II/bundled -isystem
        /share/apps/software/Core/icc/2019.1.144-GCC-8.2.0-2.31.1/tbb/include
        -isystem ~/local_opt_GCC7/boost/include -isystem
        ~/local_opt_GCC7/petsc/include -isystem
        ~/local_opt_GCC7/trilinos/include -isystem
        ~/local_opt_GCC7/arrayfire/include -isystem
        /share/apps/software/imkl/2019.5.281-iimpi-2019b/mkl/include
        -isystem ~/local_opt_GCC7/suitesparse/include -isystem
/share/apps/software/MPI/GCC-CUDA/8.2.0-2.31.1-10.1.105/OpenMPI/3.1.3/HDF5/1.10.5/include
        -isystem
        /share/apps/software/Compiler/GCCcore/8.2.0/zlib/1.2.11/include
        -isystem
        /share/apps/software/Compiler/GCCcore/8.2.0/Szip/2.1.1/include
        -isystem
        /share/apps/software/Compiler/GCC/8.2.0-2.31.1/CUDA/10.1.105/include
        -isystem
        /share/apps/software/Compiler/GCC/8.2.0-2.31.1/OpenMPI/3.1.3/include
        -isystem ~/local_opt_GCC7/adol-c/include -isystem
        ~/local_opt_GCC7/p4est/include -isystem
        ~/local_opt_GCC7/slepc/include -isystem
        ~/local_opt_GCC7/armadillo/include -isystem
/share/apps/software/MPI/GCC-CUDA/8.2.0-2.31.1-10.1.105/OpenMPI/3.1.3/FFTW/3.3.8/include
        -march=native -fopenmp-simd  -fPIC -flto -march=native -fopenmp
        -O2 -funroll-loops -funroll-all-loops -fstrict-aliasing
        -DMKL_LP64 -m64 -O3 -DNDEBUG -fPIC -pedantic -fPIC -Wall -Wextra
        -Wmissing-braces -Woverloaded-virtual -Wpointer-arith
        -Wsign-compare -Wswitch -Wsynth -Wwrite-strings
        -Wno-placement-new -Wno-literal-suffix -Wno-psabi
        -Wno-class-memaccess -fopenmp-simd -march=native -mavx
        -Wno-unused-local-typedefs -O2 -funroll-loops -funroll-all-loops
        -fstrict-aliasing -Werror -flto -std=gnu++17 -MD -MT
        CMakeFiles/test_program.dir/source/core/tester_helper.cpp.o -MF
        CMakeFiles/test_program.dir/source/core/tester_helper.cpp.o.d -o
        CMakeFiles/test_program.dir/source/core/tester_helper.cpp.o -c
~/work_directory/full_physics/Test-Controller/library/source/core/tester_helper.cpp</i><i><br>
      </i><i>~/work_directory/full_physics/Test-Controller/library/source/core/tester_helper.cpp:
        In member function 'void
        tester_helper::nonlinear_step(double&, double)':</i><i><br>
      </i><i>~/work_directory/full_physics/Test-Controller/library/source/core/tester_helper.cpp:765:5:
        error: 'MatDenseGetArrayWrite' was not declared in this scope</i><i><br>
      </i><i>     MatDenseGetArrayWrite (petsc_field.pc_spectral,
        &write_ptr);</i><i><br>
      </i><i>     ^~~~~~~~~~~~~~~~~~~~~</i><i><br>
      </i><i>~/work_directory/full_physics/Test-Controller/library/source/core/tester_helper.cpp:765:5:
        note: suggested alternative: 'MatDenseGetArrayRead'</i><i><br>
      </i><i>     MatDenseGetArrayWrite (petsc_field.pc_spectral,
        &write_ptr);</i><i><br>
      </i><i>     ^~~~~~~~~~~~~~~~~~~~~</i><i><br>
      </i><i>     MatDenseGetArrayRead</i><i><br>
      </i><i>~/work_directory/full_physics/Test-Controller/library/source/core/tester_helper.cpp:772:5:
        error: 'MatDenseRestoreArrayWrite' was not declared in this
        scope</i><i><br>
      </i><i>     MatDenseRestoreArrayWrite (petsc_field.pc_spectral,
        &write_ptr);</i><i><br>
      </i><i>     ^~~~~~~~~~~~~~~~~~~~~~~~~</i><i><br>
      </i><i>~/work_directory/full_physics/Test-Controller/library/source/core/tester_helper.cpp:772:5:
        note: suggested alternative: 'MatDenseRestoreArrayRead'</i><i><br>
      </i><i>     MatDenseRestoreArrayWrite (petsc_field.pc_spectral,
        &write_ptr);</i><i><br>
      </i><i>     ^~~~~~~~~~~~~~~~~~~~~~~~~</i><i><br>
      </i><i>     MatDenseRestoreArrayRead</i><i><br>
      </i><i>~/work_directory/full_physics/Test-Controller/library/source/core/tester_helper.cpp:
        In member function 'void
        tester_helper::nonlinear_step_material_transition()':</i><i><br>
      </i><i>~/work_directory/full_physics/Test-Controller/library/source/core/tester_helper.cpp:870:4:
        error: 'MatDenseGetArrayWrite' was not declared in this scope</i><i><br>
      </i><i>    MatDenseGetArrayWrite(split_mat, &write_mat_ptr);</i><i><br>
      </i><i>    ^~~~~~~~~~~~~~~~~~~~~</i><i><br>
      </i><i>~/work_directory/full_physics/Test-Controller/library/source/core/tester_helper.cpp:870:4:
        note: suggested alternative: 'MatDenseGetArrayRead'</i><i><br>
      </i><i>    MatDenseGetArrayWrite(split_mat, &write_mat_ptr);</i><i><br>
      </i><i>    ^~~~~~~~~~~~~~~~~~~~~</i><i><br>
      </i><i>    MatDenseGetArrayRead</i><i><br>
      </i><i>~/work_directory/full_physics/Test-Controller/library/source/core/tester_helper.cpp:874:4:
        error: 'MatDenseRestoreArrayWrite' was not declared in this
        scope</i><i><br>
      </i><i>    MatDenseRestoreArrayWrite(split_mat,
        &write_mat_ptr);</i><i><br>
      </i><i>    ^~~~~~~~~~~~~~~~~~~~~~~~~</i><i><br>
      </i><i>~/work_directory/full_physics/Test-Controller/library/source/core/tester_helper.cpp:874:4:
        note: suggested alternative: 'MatDenseRestoreArrayRead'</i><i><br>
      </i><i>    MatDenseRestoreArrayWrite(split_mat,
        &write_mat_ptr);</i><i><br>
      </i><i>    ^~~~~~~~~~~~~~~~~~~~~~~~~</i><i><br>
      </i><i>    MatDenseRestoreArrayRead</i></p>
    <p>Where does that error come from, and how can I fix it/circumvent
      it? I compile the program using gcc 8.2.0 (including mpi-wrappers)
      on the production machine, and with gcc 9.3.1 on the dev machine.</p>
    <p>Thanks,</p>
    <p>regards,</p>
    <p>Roland<br>
    </p>
  </div>

</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>