jwcy0529 / torchFOAM

Using PyTorch within OpenFOAM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

torchFOAM

This repository is about how to use PyTorch with OpenFOAM®.

Runing on Compute Canada clusters

Please note that due to having no access to root on clusters you may have some warnings. Therefore, it is encoraged to use containers running torchFOAM. In order to use PyTorch within OpenFOAM module on one of Compute Canada clusters, you need to do the following steps:

  1. Load the following modules:
  • StdEnv/2020
  • gcc/9.3.0
  • openmpi/4.0.3
  • openfoam
  1. Download the libtorch library from here.
  2. Unzip the downloaded file and set an environment variable TORCH_LIBRARIES to /path/to/libtorch
  3. You are good to wmake the code!

Happy Computing!

About

Using PyTorch within OpenFOAM

License:MIT License


Languages

Language:Jupyter Notebook 82.6%Language:C++ 15.4%Language:C 1.3%Language:Python 0.6%Language:Shell 0.1%