Skip to content

Commit

Permalink
Merge branch 'refs/heads/Ver.2.0_alpha' into Ver.2.0_w_PVR
Browse files Browse the repository at this point in the history
  • Loading branch information
hiromatsui committed Aug 18, 2023
2 parents ed1ab88 + 85bb839 commit 545b739
Show file tree
Hide file tree
Showing 216 changed files with 16,302 additions and 3,603 deletions.
1 change: 0 additions & 1 deletion .licensing.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"examples/**",
"doxygen/**",
"**/*m4",
"**/CMakeLists.txt",
"config.guess",
"config.sub",
"configure",
Expand Down
17 changes: 0 additions & 17 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,3 @@ The easiest way to install Calypso is the following:

For details of the configuration, type
./configure --help

Calypso also supports CMake configuration and compilation. The procedure for this is:

1. Create build directory and configure
mkdir build ; cd build ; cmake ..
2. Compile
make

For a guided configuration, use ccmake instead of cmake:

1. Create build directory and configure
mkdir build ; cd build ; ccmake ..
2. Edit configuration options
3. Compile
make


Binary file added doc/Images/Editor_notebook.pdf
Binary file not shown.
Binary file added doc/Images/vim_folding.pdf
Binary file not shown.
103 changes: 73 additions & 30 deletions doc/tex_src/controls_CALYPSO.tex

Large diffs are not rendered by default.

20 changes: 14 additions & 6 deletions doc/tex_src/install_CALYPSO.tex
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,10 @@ \subsubsection{Compile}
sph_add_initial_field* sph_mhd* tests/
sph_initial_field* sph_snapshot* utilities/
$ ls -F utilities/
assemble_sph* make_f90depends* t_ave_monitor_data*
field_to_VTK* sectioning* three_vizualizations*
gen_sph_grids* section_to_vtk*
./ field_to_VTK* sectioning*
../ gen_sph_grids* t_ave_monitor_data*
assemble_sph* make_f90depends* three_vizualizations*
check_control_mhd* section_to_vtk*
\end{verbatim}
%
%
Expand All @@ -241,6 +242,8 @@ \subsubsection{Compile}
\begin{description}
\item{\tt assemble\_sph: }\\
Data transfer program to change number of subdomains.
\item{\tt check\_control\_mhd: }\\
Quick check program for control data consistency.
\item{\tt gen\_sph\_grids: }\\
Preprocessing program for data transfer for spherical harmonics transform
\item{\tt t\_ave\_monitor\_data: }\\
Expand Down Expand Up @@ -306,20 +309,20 @@ \subsubsection{Distclean}
% make distclean
\end{verbatim}


\subsubsection{Install}
The executive files are copied to the install directory \verb|$(INSTDIR)/bin|. The install directory \verb|$(INSTDIR)| is defined in Makefile, and can also set by \verb|${--prefix}| option for \verb|configure| command. Alternatively, you can use the programs in \verb|${SRCDIR}/bin| directory without running \verb|make install|. If directory \verb|${PREFIX}| does not exist, \verb|make install | creates \verb|${PREFIX}|, \verb|${PREFIX}/lib|, \verb|${PREFIX}/bin|, and \verb|${PREFIX}/include| directories. No files are installed in \verb|${PREFIX}/lib| and \verb|${PREFIX}/include|.


\subsubsection{Construct dependecies (only for developper)}
The build process of Calypso consists of three steps:
Actual build process of Calypso by \verb|% make| consists of three steps:
%
\begin{enumerate}
\item Construct dependency of source files {\tt Makefile.depends} in each directory by {\tt make depends} command.
\item Construct {\tt Makefile} in {\tt [WORKDIR]} directory by {\tt make makemake} command.
\item Move into {\tt [WORKDIR]} and run {\tt make} command in {\tt [WORKDIR]} directory ({\tt cd [WORKDIR]; make})
\end{enumerate}
%
gmake supports parallel build by using {\tt -j [\# of process]} option, but the step 1 and 2 do not work correctly under the parallel build, but the step 3 (build under {\tt [WORKDIR} support the parallel build. Consequently, build time can be significantly reduced by run the step 3 sepalately with {\tt -j} option.
{\color{red} (Caution) Many large computer system does not recommend to use parallel build on the login nodes. Please check the computer center's documentations}

Fortran90 routines need to be build after modules which are used in the routines. C source files also need dependency among include files. Consequently, list of dependency of source files are saved in the file \verb|Makefile.depends| in each directory. When you modify the source files with changing the module usage, \verb|Makefile.depends| files need to be updated. To update the \verb|Makefile.depends|files, use the \verb|make| command at the \verb|[CALYPSO_HOME]| directory as \\
%
Expand All @@ -329,6 +332,11 @@ \subsubsection{Construct dependecies (only for developper)}

This process generate dependencies of the Fortran modules by program \verb|make_f90depends|. For C source files, the dependency is generated by the gcc with \verb|-MM -w -DDEPENDENCY_CHECK| option. Consequently, the dependencies need to be generated by the environment with gcc or compatible compiler. After generating the dependency, you can transfer the modified package and build without using gcc.

\subsection{Parallel build}
gmake supports parallel build by using {\tt -j [\# of process]} option. Calypso's build process supports purallel build. it may reduce the compile time. (We checked on Ubuntu and Mac OS.) \\
{\color{red} (Caution) Many large computer centers do not recommend to use parallel build on their login nodes. Please check the computer center's if you can use parallel builds}


\subsection{Install without using configure}
\label{section:no_configure}
It is possible to compile Calypso without using the \verb|configure| command. To do this, you need to edit the \verb|Makefile|. First, copy \verb|Makefile| from template \verb|Makefile.in| as
Expand Down
Empty file removed doc/tex_src/programs_CALYPSO.log
Empty file.
65 changes: 64 additions & 1 deletion doc/tex_src/programs_CALYPSO.tex
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@ \subsection{Control file}
\hyperref[href_t:time_loop_ctl]{\tt time\_loop\_ctl}
\begin{itemize} \label{href_i:time_loop_ctl}
\item \hyperref[href_t:scheme_ctl]{\tt scheme\_ctl [EVOLUTION\_SCHEME]}
\item \hyperref[href_t:coef_imp_v_ctl]{\tt coef\_imp\_v\_ctl [COEF\_INP\_U]}
\item \hyperref[href_t:coef_implicit_ctl]{\tt coef\_implicit\_ctl [COEF\_INP\_U]}
\item \hyperref[href_t:coef_imp_v_ctl]{\tt coef\_imp\_v\_ctl [COEF_INPLICIT]}
\item \hyperref[href_t:coef_imp_t_ctl]{\tt coef\_imp\_t\_ctl [COEF\_INP\_T]}
\item \hyperref[href_t:coef_imp_b_ctl]{\tt coef\_imp\_b\_ctl [COEF\_INP\_B]}
\item \hyperref[href_t:coef_imp_c_ctl]{\tt coef\_imp\_c\_ctl [COEF\_INP\_C]}
Expand Down Expand Up @@ -564,7 +565,10 @@ \subsubsection{Spatial resolution definition block}
%
\item Block \hyperref[href_t:num_grid_sph]{\tt num\_grid\_sph}
\begin{itemize} \label{href_i:num_grid_sph}
\item \hyperref[href_t:sph_center_coef_ctl]{\tt sph\_center\_coef\_ctl [TYPE]}
\item \hyperref[href_t:sph_grid_type_ctl]{\tt sph\_grid\_type\_ctl [TYPE]}
\item \hyperref[href_t:truncation_level_ctl]{\tt truncation\_level\_ctl [Lmax]}
\item \hyperref[href_t:longitude_symmetry_ctl]{\tt longitude\_symmetry\_ctl [M\_sym]}
\item \hyperref[href_t:ngrid_meridonal_ctl]{\tt ngrid\_meridonal\_ctl [Ntheta]}
\item \hyperref[href_t:ngrid_zonal_ctl]{\tt ngrid\_zonal\_ctl [Nphi]}
%
Expand All @@ -581,6 +585,7 @@ \subsubsection{Spatial resolution definition block}
%
\\
\item Array \hyperref[href_t:r_layer]{\tt r\_layer [Layer \#] [Radius]}
\item Array \hyperref[href_t:add_external_layer]{\tt add\_external\_layer [Radius]}
%
\item Array \hyperref[href_t:boundaries_ctl]{\tt boundaries\_ctl [Boundary\_name] [Layer \#]}
\end{itemize}
Expand Down Expand Up @@ -1725,6 +1730,64 @@ \subsubsection{Data output for Field along with a circle}
\section{Utility programs}
Calypso includes some utility programs. These programs are useful to data analysis and debugging the simulation programs.

\subsection{Control file Editor}
This program is a simple Jupyter notebook (\url{https://jupyterbook.org/en/stable/intro.html#}) to edit control files. There are two Jupter notebook files \\
(\verb|Calypso_control_editor.ipynb| and \verb|Calypso_control_glossary.ipynb|) in \verb|[CALYPSO_DIR]/src/Jupyter/| folder. \verb|Calypso_control_editor.ipynb| is the notebook to edit control files, and \verb|Calypso_control_glossary.ipynb| is the document of the control data based on the Section \label{section:def_control}. Using JupyterLab (\url{https://jupyter.org}) is recommended because JupyterLab can open the editor \\
\verb|Calypso_control_editor.ipynb| and document \\
\verb|Calypso_control_glossary.ipynb| side by side as showin in Figure{fig:notebook}.
%
\begin{figure}[htbp]
\begin{center}
\includegraphics*[width=110mm]{Images/Editor_notebook}
\end{center}
\caption{Example of control editor on JupyterLab.}
\label{fig:notebook}
\end{figure}
%

If JupyterLab starts at the \verb|[CALYPSO_DIR]| directory, and you can find the notebook files under \verb|src/Jupyter/| directory. On JupyterLab, two notebooks can be opened side by side. After opening either notebook file, you can split the view by choosing \verb|File -> New View for Notebook|. Then, another file can be opened on the either side of view. This editor supports drag and drop from another notebook or programs. The instruction of usege of the editor is written in \\
\verb|Calypso_control_editor.ipynb|.

\subsection{Vim scripts for folding the control files}
This Vim scripts add the folding the control blocks and concurrent comment lines.
After starting the vim, this scripts can be loaded by the following command: \\
\\
\\
\verb|: source [CALYPSO_DIR]/src/Vim_script/Folding_Calypso.vim|
\\
\\
%
\begin{figure}[htbp]
\begin{center}
\includegraphics*[width=90mm]{Images/vim_folding}
\end{center}
\caption{Example of data folding on Vim.}
\label{fig:vim_folding}
\end{figure}
%
After loading the script, the control data will already be folded. The basic commands for the folding are the following:
%
\begin{description}
\item{\tt za: } Toggles the current fold open or closed. – The most useful command to know of all of these.
\item{\tt zA: } Same as \verb|za| except it toggles all folds beneath as well. Since folds can be nested (such as with indent folding), this will toggle the state of all the folds underneath of it, not just the current fold.
\item{\tt zc: } Close the current fold.
\item{\tt zC: } Same as \verb|zc|, but closes folds nested underneath as well.
\item{\tt zo: } Open the current fold.
\item{\tt zO: } Same as \verb|zo|, but opens folds nested underneath as well.
\end{description}
%

The \verb|vi| in Mac OS is equivalent to the \verb|vim|, so the this script works on Mac OS without any instllation. However, the full featured vim may be refquired on Linux. You can check the avaiable feature by \verb|vi (or vim) --version| command. On Ubuntu, you can install large version of vim by \verb|% apt install vim|.


\subsection{Control file consistency check ({\tt check\_control\_mhd})}
This small program checks if the control file \verb|control_MHD| and its external files can be read correctly by using Calypso's IO routines. The program will start by the following command:\\
\\
\verb|% [CALYPSO_DIR]/bin/check_control_mhd control_MHD|
\\
If the control files read successfully, the program outputs read control data on screeen. If program stopped with error, or missing control parameters in the output, please check the control files.


\subsection{Data transform program ({\tt sph\_snapshot})}
\label{section:sph_snapshot}
%
Expand Down
4 changes: 3 additions & 1 deletion src/C_libraries/BASE/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ dir_list:

lib_name:

lib_archve:
libtarget:

lib_archve: libtarget
@echo ' ''$$(AR)' '$$(ARFLUGS)' rcsv '$$@' '$$(OBJ_BASE_C)' >> $(MAKENAME)


Expand Down
4 changes: 2 additions & 2 deletions src/External_libs/FFTPACK5.1D/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ lib_name:
@echo 'LIB_FFTPACK_FILE = $(LIB_FFTPACK_FILE)' >> $(MAKENAME)
@echo >> $(MAKENAME)

lib_tasks: libtarget lib_archve
lib_tasks: lib_archve
@echo ' ''$$(RANLIB) $$@' >> $(MAKENAME)

libtarget:
@echo '' >> $(MAKENAME)
@echo '$$(LIB_FFTPACK_FILE): $$(MOD_FFTPACK)'>> $(MAKENAME)

lib_archve:
lib_archve: libtarget
@echo ' $$(AR) $$(ARFLUGS) rcsv $$@ $$(MOD_FFTPACK)' >> $(MAKENAME)

mod_list:
Expand Down
4 changes: 3 additions & 1 deletion src/Fortran_libraries/MHD_src/IO/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ MOD_MHD_IO = $(addsuffix .o,$(basename $(SOURCES)) )
dir_list:
@echo 'MHD_IO_DIR = $(MHD_IO_DIR)' >> $(MAKENAME)

lib_archve:
libtarget:

lib_archve: libtarget
@echo ' ''$$(AR)' '$$(ARFLUGS)' rcsv '$$@' '$$(MOD_MHD_IO)' \
>> $(MAKENAME)

Expand Down
Loading

0 comments on commit 545b739

Please sign in to comment.