Git Product home page Git Product logo

tumbler's Introduction

tumbler

source code and scripts for Metal Powder Group to run tumbler tests

Things to have ready on your own machine

WinSCP for Windows user to download/edit files from the remote location

Paraview for visualize particles

Get a copy of Chrono and its submodules

  1. ssh into your account on Euler
ssh [account_name]@euler-login-2.wacc.wisc.edu
  1. Clone chrono repo
git clone https://github.com/projectchrono/chrono.git
  1. Now you have a copy of chrono, go into chrono directory
cd chrono
  1. set up submodules by typing the following commands
git submodule init
git submodule update

Build chrono

  1. go to the home directory, make a new folder and go into the new folder
cd
mkdir build_chrono
cd build_chrono

Here are some 2. load modules needed for building Chrono::GPU

module load nvidia/cuda/11.3.1.lua 
  1. load cmake, first argument locates the source code, second argument is the build directory (in this case current folder .), third argument is a compiler flag
ccmake ../chrono . -DCUDA_HOST_COMPILER=$CU_CC
  1. In cmake gui, type c once for configure, scroll down to ENABLE_MODULE_GPU and set to ON, press c twice, and then g for generate to create Makefile. If there is no error, cmake gui will close, are you are back to build_chrono directory. Now type
make -j 64

it will take its sweet time, so be patient. Note that you do not need to modify anything in chrono or build_chrono

Get a copy of tumber test repo and compile the code

  1. go to your home directory by typing cd, then clone tumbler test repo
git clone https://github.com/LuningFang/tumbler.git

Folder source has two programs, test_GPU_tumbler_settling.cpp is used to create a settled configuration of particles and test_GPU_tumbler_spinning.cpp is for rotating the tumbler. Folder scripts contains the script necessary for running the above two tests
2. build the tests, create the build folder

cd tumbler
mkdir build
cd build

use cmake to generate the Makefile

ccmake ../source/ .

you need to link tumbler test to Chrono library, type c once for configure, then type e to exit screen, then in the field of Chrono_DIR type the following directory srv/home/[YOUR_EULR_ACCOUNT_NAME]/build_chrono/cmake/, type c twice until g shows up, press g
Now you can build

make -j 64

Submit jobs to run tumbler tests

  1. Go to the directory of scripts
cd ../scripts/
  1. Submit run_tumbler_test.sh using the following command
sbatch run_tumbler_test.sh

To see where your job is and how long it has been running, you can type the following command in the terminal,

squeue -u [YOUR_EULER_ACCOUNT_NAME]

For example

squeue -u fang
  1. In run_tumbler_test.sh you can modify parameter drum_height and drum_omega, note that drum height is in centimeter and drum omega is in rpm. If your job runs successfully, you will see an output file named as tumbler*.out in the same folder. Each time step, a csv file that contains the positions and absolute velocity of all the particles is created and written in the following folder /srv/home/fang/tumbler/build/DEMO_OUTPUT/tumbler_settling/ for settling phase, and /srv/home/fang/tumbler/build/DEMO_OUTPUT/tumbler_spinning/spinning_omega_XX_rpm/ for spinning phase at XX rpm.
  2. To modify drum_height and drum_omega in the script, Windows users can use WinSCP, Mac users can use vim, see this link for a tutorial video.

Postprocessing

  1. After the simulation is done, you can download your output from Euler to local machine.

Windows user can use WinSCP.
Hostname is euler-login-2.wacc.wisc.edu. Username and password is your username and password for Euler.

For Mac user, in your terminal, go to any directory where you wish to keep the files, type

scp '[YOUR_EULER_ACCOUNT_NAME]@euler-login-2.wacc.wisc.edu:[directory-to-your-csv-files]/*' .

For example,

scp '[email protected]:/srv/home/fang/tumbler/build/DEMO_OUTPUT/tumbler_spinning/spinning_omega_10_rpm/*' .

If the command works, you will be prompted with password.

  1. Start Paraview for postprocessing, slides available

What to do when Luning modifies the code

  1. Go to the tumbler directory on your cluster using cd, use command pwd to check if you are in the right place, my output look something like this srv/home/fang/tumbler
  2. Type the command to get updated source code
git pull
  1. Rebuild the source code to get an updated executable. Go to the build directory (use pwd to check, mine looks like /srv/home/fang/tumbler/build), and type
make -j 64

Let Luning know if any of the above two steps don't work
4. Switch to your script folder,

cd ../scripts

and run the script using sbatch command.

tumbler's People

Contributors

luningfang 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.