学习中心

Setting Up GPU-Accelerated Computing Within COMSOL Multiphysics®


COMSOL Multiphysics®includes support for GPU-accelerated computing. This guide features quick setup instructions for installing and configuring the software necessary to use this functionality.

In COMSOL Multiphysics®, GPU acceleration can significantly increase performance for time-dependent simulations that use the discontinuous Galerkin (dG) method, such as those using thePressure Acoustics, Time Explicitinterface, and for training deep neural network (DNN) surrogate models. This functionality is available for Windows®and Linux®operating systems and requires a compatible NVIDIA®graphics card, along with an installation of the CUDA®Toolkit.

Note: This functionality is available for COMSOL Multiphysics®version 6.3.

Compatibility and Requirements

The operating system and hardware requirements for theCUDA®Toolkitcomponent include the following:

Setup Process for the CUDA®Toolkit

The process of installing the CUDA®Toolkit and then enabling GPU-accelerated computing in your COMSOL Multiphysics installation includes the following steps:

  1. Installing the NVIDIA®CUDA®Toolkit
  2. Installing COMSOL Multiphysics®with GPU compute support
  3. Verifying the CUDA Toolkit installation in COMSOL Multiphysics®

Each step is outlined below in further detail.

Installing the NVIDIA®CUDA®Toolkit

Step 1: Download the Installer

Start by downloading theCUDA Toolkit 12.4installer from theCUDA Tookit 12.4 Downloadspage. You should select the appropriate operating system, architecture, distribution (option for Linux®OS), and version number from theSelect Target Platformsection of the CUDA Toolkit 12.4 Downloads page.

After navigating the tree of supported configurations and systems, the final choice of installer type will be eitherlocalornetwork. Thelocalinstaller is a larger initial download but includes everything necessary for installation. Thenetworkinstaller is a much smaller initial download and only downloads further files if and when they are needed. You can choose the installer type that best suits your needs. Both types will create installations compatible with COMSOL Multiphysics®.

Step 2: Run the Installer

The installation process is different for Windows®and Linux®operating systems, and differs between Linux®distributions as well. To ensure that the installation instructions are up-to-date, please follow the official installation instructions provided by NVIDIA®:

If a minimal installation is desired, select theCustom (Advanced)installation option. The only parts of the CUDA®Toolkit that are needed for use with COMSOL Multiphysics®are theCUDA RuntimeandDrivercomponents.

Installing COMSOL Multiphysics®with GPU Compute Support

In the COMSOL Installer, there are two sections with options regarding GPU acceleration. These sections are detailed in the steps below, with screenshots from the Windows®version of the Installer. The Linux®version looks slightly different, but the same instructions apply. For general instructions on how to install COMSOL Multiphysics, please see theCOMSOL Multiphysics®Installation Guidein theCOMSOL Documentationor the Learning Center article "How to Install COMSOL Multiphysics®".

Step 1: The Products Page

Note: This step is only required if you are installing GPU compute support for training DNN surrogate models. To resume installing GPU compute support for the dG method, please proceed to Step 2.

The available selection of products to install depends on your license. All COMSOL Multiphysics 6.3 installations include support for using GPU acceleration with the dG method. To be able to use GPU acceleration for DNN training, theCUDA DNN Supportcomponent must be selected on theProductspage of the Installer. Note that this will add 1.3 GB to your COMSOL Multiphysics installation on Windows®and 1.8 GB to your installation on Linux®.

A UI screenshot of the COMSOL Installer with the Products tab selected and the CUDA DNN Support checkbox highlighted.

A screenshot of the COMSOL Multiphysics 6.3 Installer with theProductspage open and theCUDA DNN Supportcheckbox highlighted.

Step 2: The Options Page

TheCUDAsection of theOptionspage contains aCUDA Directoryfield for the path to the CUDA Toolkit installation. In most cases, installing the CUDA®Toolkit before starting the COMSOL Multiphysics Installer will set environment variables that let the Installer detect this path automatically. If the correct CUDA Toolkit directory is not detected automatically, the path can be set in the Installer or changed in thePreferenceswindow settings after installation is complete.

A UI screenshot of the COMSOL Installer with the Options tab selected and the CUDA Directory file path entered.

A screenshot of the COMSOL Multiphysics 6.3 Installer with theOptionspage open and the default CUDA Toolkit installation path in theCUDA Directoryfield.

Verifying the CUDA Toolkit Installation in COMSOL Multiphysics®

After installing and configuring COMSOL Multiphysics®and the CUDA®Toolkit, you can verify your installation by starting COMSOL Multiphysics®and opening thePreferenceswindow. Do this by going under theFilemenu and selectingPreferences. From there you can navigate to theComputingsection and click on theGPU Accelerationpage. Lastly, click theVerify CUDA Installationbutton.

A UI screenshot of the Preferences window in COMSOL Multiphysics with the Verify CUDA Installation dialog open on a Windows® operating system.

ThePreferenceswindow in COMSOL Multiphysics®in Windows®, with aVerify CUDA Installationdialog open.

A UI screenshot of the Preferences window in COMSOL Multiphysics with the Verify CUDA Installation dialog open on an Ubuntu® operating system.

The Preferences window in COMSOL Multiphysics®in Ubuntu®, with aVerify CUDA Installationdialog open.

GPU-accelerated computing is now supported in your installation of COMSOL Multiphysics®and is ready for use. Some examples of enabling GPU-acceleration in the settings in COMSOL Multiphysics®can be seen in the figures below.

The Model Builder with the Pressure Acoustics, Time Explicit interface selected with the settings to enable GPU-accelerated computing selected. The Model Builder with the Pressure Acoustics, Time Explicit interface selected with the settings to enable GPU-accelerated computing selected.
The Model Builder with the Time-Dependent Solver node expanded and the Hardware Acceleration node selected showing the settings to enable GPU-accelerated computing The Model Builder with the Time-Dependent Solver node expanded and the Hardware Acceleration node selected showing the settings to enable GPU-accelerated computing
The Model Builder with the Deep Neural Network function selected with the settings to enable GPU acceleration for training. The Model Builder with the Deep Neural Network function selected with the settings to enable GPU acceleration for training.

TheUse accelerated solver formulationcheckbox (left),Accelerated solver for discontinuous Galerkincheckbox (center) andTrain on GPUcheckbox (right) are selected for aPressure Acoustics, Time Explicitmodel, time-dependent simulation that uses the dG method, and for DNN training, respectively.

Further Learning

For more information on GPU support for time-dependent simulations using the dG method and surrogate model training, please see theCOMSOL Multiphysics Release NotesandCOMSOL Multiphysics Reference Manualin thedocumentation.

NVIDIA and CUDA are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and/or other countries. Linux is a registered trademark of Linus Torvalds in the U.S. and other countries. Microsoft and Windows are trademarks of the Microsoft group of companies. Ubuntu is a registered trademark of Canonical Ltd.


请提交与此页面相关的反馈,或点击此处联系技术支持

Baidu
map