mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Move Python API into openmc/ directory and move Python scripts into scripts/
directory.
This commit is contained in:
parent
2f0e89508a
commit
498e07d0bf
39 changed files with 32 additions and 47 deletions
|
|
@ -112,7 +112,7 @@ repository::
|
|||
By default, the cloned repository will be set to the development branch. To
|
||||
switch to the source of the latest stable release, run the following commands::
|
||||
|
||||
cd openmc/src
|
||||
cd openmc
|
||||
git checkout master
|
||||
|
||||
.. _GitHub: https://github.com/mit-crpg/openmc
|
||||
|
|
@ -132,14 +132,13 @@ following
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
mkdir src/build
|
||||
cd src/build
|
||||
mkdir build && cd build
|
||||
cmake ..
|
||||
make
|
||||
|
||||
Note that first a build directory is created as a subdirectory of the source
|
||||
directory. The Makefile in ``src/`` will automatically perform an out-of-source
|
||||
build with default options.
|
||||
directory. The Makefile in the top-level directory will automatically perform an
|
||||
out-of-source build with default options.
|
||||
|
||||
CMakeLists.txt Options
|
||||
++++++++++++++++++++++
|
||||
|
|
@ -166,7 +165,7 @@ should be used:
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
cmake -Ddebug=on /path/to/src
|
||||
cmake -Ddebug=on /path/to/openmc
|
||||
|
||||
Compiling with MPI
|
||||
++++++++++++++++++
|
||||
|
|
@ -177,14 +176,14 @@ the MPI Fortran wrapper. For example, in a bash shell:
|
|||
.. code-block:: sh
|
||||
|
||||
export FC=mpif90
|
||||
cmake /path/to/src
|
||||
cmake /path/to/openmc
|
||||
|
||||
Note that in many shells, an environment variable can be set for a single
|
||||
command, i.e.
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
FC=mpif90 cmake /path/to/src
|
||||
FC=mpif90 cmake /path/to/openmc
|
||||
|
||||
Compiling with HDF5
|
||||
+++++++++++++++++++
|
||||
|
|
@ -195,14 +194,14 @@ the HDF5 Fortran wrapper. For example, in a bash shell:
|
|||
.. code-block:: sh
|
||||
|
||||
export FC=h5fc
|
||||
cmake /path/to/src
|
||||
cmake /path/to/openmc
|
||||
|
||||
As noted above, an environment variable can typically be set for a single
|
||||
command, i.e.
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
FC=h5fc cmake /path/to/src
|
||||
FC=h5fc cmake /path/to/openmc
|
||||
|
||||
To compile with support for both MPI and HDF5, use the parallel HDF5 wrapper
|
||||
``h5pfc`` instead. Note that this requires that your HDF5 installation be
|
||||
|
|
@ -216,8 +215,7 @@ the root directory of the source code:
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
mkdir src/build
|
||||
cd src/build
|
||||
mkdir build && cd build
|
||||
cmake ..
|
||||
make
|
||||
make install
|
||||
|
|
@ -267,7 +265,8 @@ the source code root directory:
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
cd src
|
||||
mkdir build && cd build
|
||||
cmake ..
|
||||
make
|
||||
|
||||
This will build an executable named ``openmc``.
|
||||
|
|
@ -293,7 +292,6 @@ in the root directory of the OpenMC distribution:
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
cd src
|
||||
make
|
||||
|
||||
This will build an executable named ``openmc``.
|
||||
|
|
@ -312,7 +310,6 @@ the source directory and run the following:
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
cd src
|
||||
make test
|
||||
|
||||
If you want more options for testing you can use ctest_ command. For example,
|
||||
|
|
@ -320,7 +317,7 @@ if we wanted to run only the plot tests with 4 processors, we run:
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
cd src/build
|
||||
cd build
|
||||
ctest -j 4 -R plot
|
||||
|
||||
If you want to run the full test suite with different build options please
|
||||
|
|
@ -370,7 +367,7 @@ the following steps must be taken:
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
openmc/src/utils/convert_xsdir.py xsdir31 cross_sections.xml
|
||||
openmc/scripts/convert_xsdir.py xsdir31 cross_sections.xml
|
||||
|
||||
3. In the converted ``cross_sections.xml`` file, change the contents of the
|
||||
<directory> element to the absolute path of the directory containing the
|
||||
|
|
@ -416,9 +413,8 @@ Running OpenMC
|
|||
Once you have a model built (see :ref:`usersguide_input`), you can either run
|
||||
the openmc executable directly from the directory containing your XML input
|
||||
files, or you can specify as a command-line argument the directory containing
|
||||
the XML input files. For example, if the path of your OpenMC executable is
|
||||
``/home/username/openmc/src/openmc`` and your XML input files are in the
|
||||
directory ``/home/username/somemodel/``, one way to run the simulation would be:
|
||||
the XML input files. For example, if your XML input files are in the directory
|
||||
``/home/username/somemodel/``, one way to run the simulation would be:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue