Skip to content
forked from CmPA/iPic3D

Particle-in-Cell code using the moment-implicit method

Notifications You must be signed in to change notification settings

alecjohnson/iPic3D

 
 

Repository files navigation

To install and run iPic3D, you need to do the following:

  # make sure that you have installed MPI and HDF5

  # get the code:
  git clone https://github.com/alecjohnson/iPic3D.git ipic3d
  # or
  git clone git@github.com:alecjohnson/iPic3D.git ipic3d

  # set the following bootstrapping environment variable
  # (e.g. in ~/.profile):
  export IPIC_HOME="$HOME/ipic3d"

  # if running on a system for which ipic3d/env/system_name
  # exists, you just need to load the appropriate module, e.g.:
  #
  module use $IPIC_HOME/env/judge
  module load ipic
  #
  # if porting to system_name, you can create a module for your
  # system, e.g. by copying modules in env/judge and modifying
  # as appropriate; when you succeed, please contribute your
  # modules so that others can benefit from your work!
  #
  # if you do not have the module command (e.g. if you are
  # running on your own laptop) then you need to define some
  # environment variables by hand, e.g.:
  #
  # on a system with modules the appropriate directory
  # would be revealed with e.g. "module show hdf5-par":
  export HDF5_ROOT="/usr/local/hdf5-par"
  # give access to the ipic script
  export PATH=$IPIC_HOME/scripts:$PATH
  # this is used by the scripts in $IPIC_HOME/scripts
  export IPIC_MPIRUN="mpiexec"

  # create a build directory
  mkdir build
  cd build
  # configure
  ipic cmake
  # compile
  make
  # run
  ipic run

  # get help
  ipic help

If you want to use the new output format, you need to obtain
the H5hut code from Jorge Amaya.  To compile and install it:

  # Unfortunately H5hut 1.99.12 does not work for HDF5 version
  # 1.8.13 or higher, because the HDF5 committee removed an
  # MPI-POSIX driver that they thought no one was using; so do e.g.:
  module load hdf5/1.8.12
  # define HDF5_ROOT (see above)
  # install in home directory
  export H5HUT_DIR=$HOME/install
  mkdir $H5HUT_DIR
  # extract archive
  tar xvf H5hut-1.99.12.tar.bz2
  cd H5hut-1.99.12
  # configure
  ./configure --enable-parallel --enable-large-indices --prefix=$H5HUT_DIR --with-hdf5=$HDF5_ROOT
  make
  make install

To compensate for a deficiency in H5hut, we
have to use the -DPARALLEL_IO flag when we compile:

  export IPIC_CMAKE_ARGS="-DCMAKE_CXX_FLAGS=-DPARALLEL_IO -DIPIC_H5HUT_OUTPUT=ON"

Then we can build:

  mkdir build.para
  cd build.para
  ipic cmake

And then we can run:

  # change WriteMethod from default to Parallel
  vim src/inputfiles/GEM.inp
  # run the simulation; rm data/* is needed at start of each new run
  rm data/*; ipic run

About

Particle-in-Cell code using the moment-implicit method

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 60.7%
  • C 14.6%
  • Shell 14.5%
  • MATLAB 7.0%
  • Python 2.9%
  • Objective-C 0.1%
  • Other 0.2%