Skip to content

Building with Spack with CUDA and OpenMP #278

Open
@LeSnow-Ye

Description

I'm trying to build Palace with GPU (CUDA) and OpenMP support using Spack.

The package file is same as palace/spack/local/packages/palace/package.py at main · awslabs/palace.

My installation command is spack install palace +cuda cuda_arch=86 +openmp

spack spec result: palace-spec.txt

Problem with OpenMP

After changing command palace -np 64 2DQv9_eb4_3d_resonator_eigen.json -launcher-args "--use-hwthread-cpus" to command palace -nt 64 2DQv9_eb4_2d_resonator_eigen.json, the following error occurs:

...

Git changeset ID: d03e1d9                                                                                                                                                                        Running with 1 MPI process, 64 OpenMP threads                                                                                                                                                    Detected 1 CUDA device
Device configuration: omp,cpu                                                                                                                                                                    Memory configuration: host-std
libCEED backend: /cpu/self/xsmm/blocked

...

Configuring SLEPc eigenvalue solver:
 Scaling γ = 6.087e+02, δ = 7.724e-06
 Configuring divergence-free projection
 Using random starting vector


Verification failed: (!err_flag) is false:
 --> Error during setup! Error code: 1
 ... in function: virtual void mfem::HypreSolver::Setup(const mfem::HypreParVector&, mfem::HypreParVector&) const
 ... in file: /tmp/lesnow/spack-stage/spack-stage-palace-develop-pkce5vp2bxzmswrs324vma4hf56do3ip/spack-build-pkce5vp/extern/mfem/linalg/hypre.cpp:4038

Abort(1) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0
[WARNING] yaksa: 9 leaked handle pool objects

The same configuration file works fine under [email protected] with default setup. (No OpenMP and CUDA)

Problem with GPU

When setting ["Solver"]["Device"] = "GPU", the following error occurs

spack-build-pkce5vp/extern/libCEED/backends/ceed-backend-weak.c:15 in CeedInit_Weak(): Backend not currently compiled: /gpu/cuda/magma
Consult the installation instructions to compile this backend

LIBXSMM_VERSION: feature_int4_gemms_scf_zpt_MxK-1.17-3727 (25693839)
LIBXSMM_TARGET: clx [Intel(R) Xeon(R) Gold 6226R CPU @ 2.90GHz]
Registry and code: 13 MB
Command: /home/lesnow/spack/opt/spack/linux-ubuntu20.04-cascadelake/gcc-9.4.0/palace-develop-pkce5vp2bxzmswrs324vma4hf56do3ip/bin/palace-x86_64.bin 2DQv9_eb4_2d_resonator_eigen_gpu.json
Uptime: 1.496896 s

Environment

Linux amax 5.15.0-91-generic #101~20.04.1-Ubuntu SMP Thu Nov 16 14:22:28 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.147.05   Driver Version: 525.147.05   CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:3B:00.0 Off |                  N/A |
| 30%   34C    P8    21W / 220W |    382MiB /  8192MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1929      G   /usr/lib/xorg/Xorg                 53MiB |
|    0   N/A  N/A      3658      G   /usr/lib/xorg/Xorg                167MiB |
|    0   N/A  N/A      3885      G   /usr/bin/gnome-shell               62MiB |
|    0   N/A  N/A      4195      G   ...bexec/gnome-initial-setup        3MiB |
|    0   N/A  N/A      4224      G   ...2gtk-4.0/WebKitWebProcess       20MiB |
+-----------------------------------------------------------------------------+

Compiler: palace-spec.txt


Is it an issue with Spack package file or with my local environment? Could you please suggest a solution for this issue? Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions