Commit dd123ac3 authored by Ron Rahaman's avatar Ron Rahaman

Add 'src/Nek5000/' from commit '9c6d6a36'

git-subtree-dir: src/Nek5000
git-subtree-mainline: 515d818b
git-subtree-split: 9c6d6a36
parents 515d818b 9c6d6a36
language: fortran
sudo: required
env:
matrix:
- TEST_CASE=Axi::test_PnPn_Serial
- TEST_CASE=Axi::test_PnPn_Parallel
- TEST_CASE=Axi::test_PnPn2_Serial
- TEST_CASE=Axi::test_PnPn2_Parallel
- TEST_CASE=Benard_Ray9::test_PnPn_Serial
- TEST_CASE=Benard_Ray9::test_PnPn2_Serial
# - TEST_CASE=Benard_RayDD::test_PnPn_Serial # Exceeds time limit for Travis jobs
# - TEST_CASE=Benard_RayDD::test_PnPn2_Serial # Stdout exceeds Travis' max log length
# - TEST_CASE=Benard_RayDN::test_PnPn_Serial # Exceeds time limit for Travis jobs
- TEST_CASE=Benard_RayDN::test_PnPn2_Serial
# - TEST_CASE=Benard_RayNN::test_PnPn_Serial # Exceeds time limit for Travis jobs
# - TEST_CASE=Benard_RayNN::test_PnPn2_Serial # Exceeds time limit for Travis jobs
- TEST_CASE=Eddy_EddyUv::test_PnPn_Serial
- TEST_CASE=Eddy_EddyUv::test_PnPn_Parallel
- TEST_CASE=Eddy_EddyUv::test_PnPn2_Serial
- TEST_CASE=Eddy_EddyUv::test_PnPn2_Parallel
- TEST_CASE=KovStState::test_PnPn2_Serial
- TEST_CASE=KovStState::test_PnPn2_Parallel
- TEST_CASE=LowMachTest::test_PnPn_Serial
- TEST_CASE=LowMachTest::test_PnPn_Parallel
- TEST_CASE=LowMachTest::test_PnPn2_Serial
- TEST_CASE=LowMachTest::test_PnPn2_Parallel
# - TEST_CASE=VarVis::test_PnPn_Serial # Stdout exceeds Travis' max log length
# - TEST_CASE=VarVis::test_PnPn_Parallel # Stdout exceeds Travis' max log length
# - TEST_CASE=VarVis::test_PnPn2_Serial # Stdout exceeds Travis' max log length
# - TEST_CASE=VarVis::test_PnPn2_Parallel # Stdout exceeds Travis' max log length
before_install:
- export ROOT_DIR=`pwd`
- export SOURCE_ROOT=$ROOT_DIR
- export EXAMPLES_ROOT=$ROOT_DIR/short_tests
- export F77=mpif77
- export CC=mpicc
- export IFMPI=true
- export VERBOSE_TESTS=true
- export PARALLEL_PROCS=2
- sudo apt-get update -qq
- sudo apt-get install -y libmpich-dev mpich
- virtualenv -p python2.7 $ROOT_DIR/python2-env
- source $ROOT_DIR/python2-env/bin/activate
- export PYTHONPATH="$ROOT_DIR/short_tests:$PYTHONPATH"
install:
- pip install --upgrade pip
- pip install pytest
script:
- py.test -s -v $ROOT_DIR/short_tests/NekTests.py::$TEST_CASE
# Ignore everything in this directory?
*
# Except this file
!.gitignore
# Contributing to Nek5000
Nek5000 on Github follows a forking workflow.
If you are unfamiliar with forking, take a look at [this great guide](https://guides.github.com/activities/forking/).
For a more detailed description of forking workflow, here's a [slightly longer read](https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow).
Please branch off of and open pull requests to the `develop` branch.
The `master` branch is reserved for releases.
## Where did the sources go?
As part of the move to git, the contents of the svn repo have been reorganized to match the modularlity of the codebase. Here's a brief description of each top-level directory:
### `core`
`core` contains the majority of the Nek5000 application sources.
### `jl`
`jl` contains gather/scatter communication, interpolation, and preconditioners written in highly general C code.
`jl` used to live in `nek5_svn/trunk/nek`, but is being promoted to the top level to emphasize its library-like relationship to the rest of the source.
In fact, `jl` has been extended externally in [gslib](https://github.com/gslib/gslib), which is used in other projects.
### `bin`
`bin` contains bash scripts for running nek5000 and manipulating its output on a variety of platforms, e.g. `nekmpi`.
### `tools`
`tools` contains the sources for the pre- and post-processing tools, e.g. `genmap`, which are stand-alone fortran programs.
### `tests`
`tests` contains a light-weight subset of the validation tests found in nek5000-examples and, in the future, unit-like tests to validate specific features.
Validation tests that require binary inputs, e.g. `re2` or `map` files, belong in the separate nek5000-examples repo.
### `lib`
`lib` contains original nek5000 sources that are general enough to be used by 3rd party plugin/toolbox developers or are shared with the tools.
`lib` is starting nearly empty, with sources slowly migrating into them from `core`.
### `3rd_party`
`3rd_party` contains nothing, and should remain empty save git-related meta-data files.
Its purpose it to provide a consistent place for 3rd part plugin/toolbox developers to place their code.
## Porting to the new layout
If you had previously forked the Nek5000/Nek5000 repository and made changes, you need to match the new layout before pulling.
Fortunately, this is easy!
```
cd <PATH_TO_NEK5000>
git filter-branch --force --index-filter \
'git ls-files -s | sed "s-\t-&core/-" |
GIT_INDEX_FILE=$GIT_INDEX_FILE.new \
git update-index --index-info &&
mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE' HEAD
git filter-branch --force --tree-filter \
'test -d core/jl && mv core/jl . || echo "Nothing"' HEAD
```
Now you should be able to pull in the rest of the new layout via pull request or the command line.
NEK5000: Spectral Element Computational Fluid Dynamics Solver
COPYRIGHT (c) 2008,2009,2010 UCHICAGO ARGONNE, LLC
The UChicago Argonne, LLC as Operator of Argonne National
Laboratory holds copyright in the Software. The copyright holder
reserves all rights except those expressly granted to licensees,
and U.S. Government license rights.
License
NEK5000 is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
NEK5000 is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with NEK5000. If not, see <http://www.gnu.org/licenses/>.
# Nek5000
![https://travis-ci.org/Nek5000/Nek5000](https://travis-ci.org/Nek5000/Nek5000.svg?branch=develop)
[![GPLv3 licensed](https://img.shields.io/badge/license-GPLv3-blue.svg)](https://raw.githubusercontent.com/Nek5000/nek5000/develop/LICENSE)
Nek5000 is an open source, highly scalable and portable spectral element code
designed to simulate:
* unsteady Stokes
* unsteady incompressible Navier-Stokes
* low Mach-number flows
* heat transfer and species transport
* incompressible magnetohydrodynamics (MHD)
Written in Fortran 77 and C, it relies on MPI for parallelization and on a
subset of LAPACK routines for eigenvalue computations, depending on the
particular solver employed. Nek5000 output formats can be read by the parallel
visualization package VisIt developed at LLNL/LBNL. VisIt is mandatory for
large problems (e.g. more than 100,000 spectral elements).
## Features
* Scales to over a million processes
* High-order spatial discretization using spectral elements
* High-order semi-implicit timestepping
* Incompressible + low Mach number (variable density) flows
* Efficient preconditioners (multigrid + scalable coarse grid solves)
* Highly optimized computational kernels (e.g. matrix-matrix multiply)
* Low memory footprint and scalable memory design
* High performance parallel I/O
* ALE / moving meshes and free surface flow
* Accurate Lagrangian particle tracking
* Conjugate fluid-solid heat transfer
* Scalable communication kernels
* Built-in profiling analysis
* Interface to VisIt for parallel data analysis and visualization
## Download
You can download the latest release of nek5000 as
[a zip](https://github.com/Nek5000/nek5000/archive/master.zip) or
[a tarball](https://github.com/Nek5000/nek5000/archive/master.tar.gz).
You can also clone the repository with git:
```
git clone https://github.com/Nek5000/nek5000.git -b master
```
or even check it out with svn:
```
svn co https://github.com/Nek5000/nek5000.git/branches/master nek5000
```
## User Guide
For more information, see the [user guide](https://nek5000.mcs.anl.gov/documentation/).
## Notes for users of legacy SVN repo
With the move to Git, the Nek5000 source directories have been reorganized to
improve modularity. Most of the contents of `trunk/nek/` (including the
all-important `makenek`) are now located in the `core/` directory. Scripts for
running Nek5000 (such as `nekmpi` and `nekb`) are located in the `bin/`
directory. Tools such as `genbox` and `genmap` are located in `tools/`. A
small subset of the examples (useful for quick regression tests) are located in
`short_tests/`. All examples are kept in a separate repository,
[NekExamples](https://github.com/Nek5000/NekExamples), to keep this one
light-weight.
Nek5000 works the same way it used to: build cases with `core/makenek` and run them with a script, e.g. `bin/nekmpi`.
This directory contains some short scripts for running
or manipulating nek5000 data files. A brief description
follows. Below, "blah" and "blah2" are just example
file names.
=============
Basic Scripts
=============
nek --- run nek5000 interactively (foreground)
Usage: nek blah
nekb -- run nek5000 in the background
Usage: nekb blah
nekd -- run nek5000 with gdb. (Most likely you should first
remake setting "G = -g" in the makenek script, followed
by "make clean" then "make blah".)
Usage: nekd blah (puts you into gdb)
run (gdb command)
mvn -- Rename all the relevant nek5000 data files
Usage: mvn blah blah2
cpn -- Copy all the relevant nek5000 data files
Usage: cpn blah blah2
visnek -- script to create the VISIT metadata file
Usage: visnek
===============================================
More sophisticated scripts for running with MPI
===============================================
These scripts are a bit more sophisticated and will likely
need to be tailored to each specific system, depending on
the mpi environment.
nekmpi -- run nek5000 interactively using mpirun
nekbmpi -- run nek5000 in background using mpirun
nekqsub -- create a nek5000 command script and submit using qsub
nekpbs -- run nek5000 in a batch script environment
nekvisit -- run serial nek5000 interactively with VisIt in-situ setup
nekvisitmpi -- run mpi nek5000 interactively with VisIt in-situ setup
===============================================
Scripts for running NekNek
==============================================
neknek -- runs neknek code, redirecting the output into logfile
-- np1 and np2 refer to the number of processors to be
specified for blah1 and blah2.
Usage: neknek blah1 blah2 np1 np2
neknekb -- runs neknek code in the background
Usage: neknekb blah1 blah2 np1 np2
cp $1.real $2.real
cp $1.rea $2.rea
cp $1.usr $2.usr
cp $1.map $2.map
cp $1.sep $2.sep
cp $1.box $2.box
ln $1.re2 $2.re2
mv $1.box $2.box
mv $1.rea $2.rea
mv $1.usr $2.usr
mv $1.map $2.map
mv $1.sep $2.sep
mv $1.re2 $2.re2
echo $1 > SESSION.NAME
echo `pwd`'/' >> SESSION.NAME
rm -f ioinfo
mv -f $1.log $1.log1 2>/dev/null
mv -f $1.sch $1.sch1 2>/dev/null
touch $1.rea
time ./nek5000
rm -f SESSION.NAME
echo $1 > SESSION.NAME
echo `pwd`'/' >> SESSION.NAME
rm -f ioinfo
echo -1000 >ioinfo
rm -f logfile
mv -f $1.log.1 $1.log1.1 2>/dev/null
mv -f $1.sch $1.sch1 2>/dev/null
touch $1.rea
time ./nek5000 > $1.log.1
ln $1.log.1 logfile
rm -f SESSION.NAME
echo $1 > SESSION.NAME
echo `pwd`'/' >> SESSION.NAME
touch $1.rea
rm -f ioinfo logfile
echo -1000 > ioinfo
mv -f $1.log.$2 $1.log1.$2 2>/dev/null
mv -f $1.sch $1.sch1 2>/dev/null
mpiexec -np $2 ./nek5000 > $1.log.$2
ln $1.log.$2 logfile
rm -f SESSION.NAME
echo $1 > SESSION.NAME
echo `pwd`'/' >> SESSION.NAME
rm -f ioinfo
echo -10 >ioinfo
rm -f logfile
mv -f $1.log.1 $1.log1.1 2>/dev/null
mv -f $1.sch $1.sch1 2>/dev/null
touch $1.rea
time ./nek5000 > $1.log.1
ln $1.log.1 logfile
rm -f SESSION.NAME
echo $1 > SESSION.NAME
echo `pwd`'/' >> SESSION.NAME
touch $1.rea
rm -f ioinfo logfile
echo -10 > ioinfo
mv -f $1.log.$2 $1.log1.$2 2>/dev/null
mv -f $1.sch $1.sch1 2>/dev/null
mpiexec -np $2 ./nek5000 > $1.log.$2
ln $1.log.$2 logfile
rm -f SESSION.NAME
echo $1 > SESSION.NAME
echo `pwd`'/' >> SESSION.NAME
rm -f ioinfo
echo -200 >ioinfo
rm -f logfile
mv -f $1.log.1 $1.log1.1
mv -f $1.sch $1.sch1
touch $1.rea
time ./nek5000 > $1.log.1
ln $1.log.1 logfile
rm -f SESSION.NAME
echo $1 > SESSION.NAME
echo `pwd`'/' >> SESSION.NAME
touch $1.rea
rm -f ioinfo logfile
echo -200 > ioinfo
mv -f $1.log.$2 $1.log1.$2
mv -f $1.sch $1.sch1
mpiexec -np $2 ./nek5000 > $1.log.$2
ln $1.log.$2 logfile
rm -f SESSION.NAME
echo $1 > SESSION.NAME
echo `pwd`'/' >> SESSION.NAME
rm -f ioinfo
rm -f logfile
mv -f $1.log $1.log1 2>/dev/null
mv -f $1.sch $1.sch1 2>/dev/null
touch $1.rea
nohup time ./nek5000 > $1.log &
sleep 2
ln $1.log logfile
rm -f SESSION.NAME
echo $1 > SESSION.NAME
echo `pwd`'/' >> SESSION.NAME
rm -f ioinfo
rm -f logfile
mv -f $1.log.1 $1.log1.1
mv -f $1.sch $1.sch1
touch $1.rea
time ./nek5000 > $1.log.1
ln $1.log.1 logfile
rm -f SESSION.NAME
echo $1 > SESSION.NAME
echo `pwd`'/' >> SESSION.NAME
touch $1.rea
rm -f logfile
rm -f ioinfo
mv $1.log.$2 $1.log1.$2 2>/dev/null
mv $1.sch $1.sch1 2>/dev/null
mpiexec -np $2 ./nek5000 > $1.log.$2 &
sleep 2