Giter VIP home page Giter VIP logo

sgm-pinn's Introduction

SGM-PINN

Code for SGM-PINN, DAC 2024 on Modulus 22.09 This repository contains only additional files and files that were edited from the original. This project includes source code provided by Nvidia. This project also includes code from https://github.com/Feng-Research/SPADE/tree/main and https://github.com/Feng-Research/HyperEF

Usage

Interact within a docker environment based on the 22.09 container. Full requirements and install guide for the container is here with abbreviated instructions below.

After following the installation below, from within the container you can navigate to cd /sgm-examples/ and run any of the .py files within using python <file>.py

To view the results use tensorboard from outside the container. E.g. tensorboard --logdir=./sgm-examples/ldc --port=7007 and open a web browser at localhost:7007. Scripts labelled tb_...sh are provided.

Installation (Ubuntu 20.04 or later)

  1. Ensure the docker engine in installed.
  2. Install the baseline image
  • sudo apt-get install nvidia-docker2
  • docker pull nvcr.io/nvidia/modulus/modulus:22.09
  1. Clone this repository to a working directory of your choice.
  2. Open a terminal in the working directory.
  3. Create and enter a persistent container to install the remaining requirements, also mounts the folders sgm-examples and sgm-modulus from the current directory.
    docker run --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 \
    --runtime nvidia -v ${PWD}/sgm-examples:/sgm-examples \
    -v ${PWD}/sgm-modulus:/sgm-modulus \
    -it nvcr.io/nvidia/modulus/modulus:22.09 bash
  • If this container is stopped or closed you can find it with docker container ls -a, then start or stop based on its NAME (tab to auto-complete). Then re-enter with docker exec -w /sgm-examples/ -it <CONTAINER_ID> /bin/bash.
  1. Inside the container, install Julia and required packages
    • curl -fsSL https://install.julialang.org | sh and follow a standard install
    • Run . /root/.bashrc as indicated
    • Enter the Julia REPL, and press ] to enter the pkg mode
    • Enter add SparseArrays, LinearAlgebra, Clustering, NearestNeighbors, MAT, Distances, Metis, Arpack, Statistics, DelimitedFiles, StatsBase, Random, Debugger, Laplacians#master, LinearMaps, PyCall and wait for install to complete
    • Ctrl+C and Ctrl+D to exit the REPL.
  2. In the container, install the following via pip
    • pip install pyjulia
    • pip install pycall
    • pip install julia
    • pip install hnswlib
  3. Copy the contents of sgm-modulus to /modulus/modulus cp -r /sgm-modulus/* /modulus/modulus/ or run . /sgm-modulus/load-SGM-PINN-SPADE.sh
  4. Due to a bug with PyJulia and multiprocessing, sometimes errors will be thrown at the end of training. This will be updated in a future release by implementing all code in python, but does not affect results.

For convenience a script 'dEnter' is included to enter the most recently started container.

sgm-pinn's People

Contributors

janticev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.