This repository is about how to use PyTorch with OpenFOAM®.
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:
- Load the following modules:
- StdEnv/2020
- gcc/9.3.0
- openmpi/4.0.3
- openfoam
- Download the libtorch library from here.
- Unzip the downloaded file and set an environment variable TORCH_LIBRARIES to /path/to/libtorch
- You are good to wmake the code!
Happy Computing!