xsdk-project / xsdk-examples

Example codes demonstrating the use of various XSDK packages in combination.
17 stars 10 forks source link

Add new MFEM examples for v0.4.0 #43

Closed v-dobrev closed 1 year ago

v-dobrev commented 1 year ago

Some supporting changes:

TODO:

v-dobrev commented 1 year ago

Merged in branch testing-v0.4.0 for testing ...

v-dobrev commented 1 year ago

Re-merged in branch testing-v0.4.0 for testing ...

v-dobrev commented 1 year ago

Hi @cwsmith,

As you suggested, I added the PUMI-based ex6p from MFEM as an example here.

You mentioned, you have a suitable, not too big parallel mesh (~1MB total) that we can use here. Do you mind adding it in the directory mfem/data/pumi? I can then adjusting the example, mfem/pumi/adapt.cpp, to use it.

Thanks!

v-dobrev commented 1 year ago

Re-merged in branch testing-v0.4.0 for testing ...

v-dobrev commented 1 year ago

Re-merged in branch testing-v0.4.0 for testing ...

v-dobrev commented 1 year ago

Re-merged in branch testing-v0.4.0 for testing ...

v-dobrev commented 1 year ago

Re-merged in branch testing-v0.4.0 for testing ...

balay commented 1 year ago
g++: error: unrecognized command line option '-Xcompiler=-fopenmp'
make[2]: *** [mfem/hypre/CMakeFiles/magnetic-diffusion.dir/build.make:79: mfem/hypre/CMakeFiles/magnetic-diffusion.dir/magnetic-diffusion.cpp.o] Error 1

ref: [disable amrex sundials] balay@xsdk:/data/balay/spack>nice ./bin/spack install --keep-stage --dont-restage --test=root --fail-fast -j32 xsdk-examples@0.4.0%gcc@9.2.0+cuda cuda_arch=70 ^cuda@11.6.0 ^openmpi ^xsdk@0.8.0+trilinos+cuda cuda _arch=70 ^dealii~hdf5



[spack-build-out.txt](https://github.com/xsdk-project/xsdk-examples/files/11456101/spack-build-out.txt)
v-dobrev commented 1 year ago
g++: error: unrecognized command line option '-Xcompiler=-fopenmp'
make[2]: *** [mfem/hypre/CMakeFiles/magnetic-diffusion.dir/build.make:79: mfem/hypre/CMakeFiles/magnetic-diffusion.dir/magnetic-diffusion.cpp.o] Error 1

ref: [disable amrex sundials] balay@xsdk:/data/balay/spack>nice ./bin/spack install --keep-stage --dont-restage --test=root --fail-fast -j32 xsdk-examples@0.4.0%gcc@9.2.0+cuda cuda_arch=70 ^cuda@11.6.0 ^openmpi ^xsdk@0.8.0+trilinos+cuda cuda _arch=70 ^dealii~hdf5


[spack-build-out.txt](https://github.com/xsdk-project/xsdk-examples/files/11456101/spack-build-out.txt)

I think we just need to tell CMake to treat the input files as CUDA similar to the way we do it for HIP. Then it should use nvcc for compilation and -Xcompiler=-fopenmp should be fine.

v-dobrev commented 1 year ago

@balay,

I just pushed the change I mentioned above regarding the CUDA language.

I also re-merged this in branch testing-v0.4.0 for testing ...

balay commented 1 year ago

Thanks! Now I get:


10 errors found in build log:
     202    -- SKIPPED HYPRE-ij_laplacian example. Requires ENABLE_SUPERLU=ON, ENABLE_CUDA=OFF, and ENABLE_HIP=OFF but got ON, ON, and OFF
     203    -- Found OpenMP_C: -fopenmp (found version "4.5")
     204    -- Found OpenMP_CXX: -fopenmp (found version "4.5")
     205    -- Found OpenMP_Fortran: -fopenmp (found version "4.5")
     206    -- Found OpenMP: TRUE (found version "4.5")
     207    -- Configuring done (12.8s)
  >> 208    CMake Error in mfem/hiop/CMakeLists.txt:
     209      CUDA_ARCHITECTURES is empty for target "adv".
     210
     211
  >> 212    CMake Error in mfem/hiop/CMakeLists.txt:
     213      CUDA_ARCHITECTURES is empty for target "adv".
     214
     215
  >> 216    CMake Error in mfem/hypre/CMakeLists.txt:
     217      CUDA_ARCHITECTURES is empty for target "magnetic-diffusion".
     218
     219
  >> 220    CMake Error in mfem/hypre/CMakeLists.txt:
     221      CUDA_ARCHITECTURES is empty for target "magnetic-diffusion".
     222
     223
  >> 224    CMake Error in mfem/strumpack/CMakeLists.txt:
     225      CUDA_ARCHITECTURES is empty for target "diffusion-eigen".
     226
     227
  >> 228    CMake Error in mfem/strumpack/CMakeLists.txt:
     229      CUDA_ARCHITECTURES is empty for target "diffusion-eigen".
     230
     231
  >> 232    CMake Error in mfem/hypre-superlu/CMakeLists.txt:
     233      CUDA_ARCHITECTURES is empty for target "convdiff".
     234
     235
  >> 236    CMake Error in mfem/hypre-superlu/CMakeLists.txt:
     237      CUDA_ARCHITECTURES is empty for target "convdiff".
     238
     239
  >> 240    CMake Error in mfem/petsc/CMakeLists.txt:
     241      CUDA_ARCHITECTURES is empty for target "obstacle".
     242
     243
  >> 244    CMake Error in mfem/petsc/CMakeLists.txt:
     245      CUDA_ARCHITECTURES is empty for target "obstacle".
     246
     247
     248    -- Generating done (0.1s)
     249    CMake Generate step failed.  Build files cannot be regenerated correctly.
v-dobrev commented 1 year ago

Haha, fix one error get more errors. It's strange the same error is repeated twice.

At this point, I don't have an idea what's going wrong. I'll try to see if I can reproduce and poke around the log files. I'll post here if I find some clues.

v-dobrev commented 1 year ago

By the way, what version of cmake is being used when you get this failures?

balay commented 1 year ago
balay@xsdk:/data/balay/spack>./bin/spack find cmake
-- linux-centos7-cascadelake / gcc@9.2.0 ------------------------
cmake@3.26.3
==> 1 installed package
v-dobrev commented 1 year ago

Re-merged in branch testing-v0.4.0 for testing ...

v-dobrev commented 1 year ago

Re-merged in branch testing-v0.4.0 for testing ...

v-dobrev commented 1 year ago

@balay, regarding the CMake errors about CUDA_ARCHITECTURES is empty for target ..., see https://github.com/xsdk-project/xsdk-examples/pull/42#issuecomment-1547138568.

v-dobrev commented 1 year ago

Re-merged in branch testing-v0.4.0 for testing ...

v-dobrev commented 1 year ago

Re-merged in branch testing-v0.4.0 for testing ...