bin scripts
Brief description of the scripts included in pencil-code/bin.
Script |
Purpose |
|---|---|
auto-test |
|
build-testcase-cvs |
Create a directory called auto-test/ containing the output generated by the LATEST CVS VERSION (without any user mods) using run.in and start.in, also copied to the auto-test dir. |
combine_videofiles |
Runs a helper executable; builds it first, if necessary |
copy-snapshots |
Copy snapshots VAR# and TAVG# from /scratch to $PBS_O_WORKDIR (from where the code started). Relies on PBS (and on tcsh) and is needed on Horseshoe (the Odense cluster). Should better be a Perl script. |
copy-snapshots_exp |
Copy snapshots VAR# and TAVG# from /scratch to the current data directory. Should better be a Perl script. |
cvs-add-rundir |
Add the current run directory to the CVS repository. Assumes that the directory above (`..’) is already under CVS. |
cvsci_run |
This script adds a new run to the repository and checks in all *.in files as well as material from the data and src directories. |
cvsci_run_bash |
This script adds a new run to the repository and checks in all *.in files as well as material from the data and src directories. |
cvsci_run_old |
This script adds a new run to the repository and checks in all *.in files as well as material from the data and src directories. |
dx_get_datadir |
Read in a datadir.in if it exists and output the contents For reading into DX |
dx_list_varfiles |
Get list of VAR? files available or return 0 for var.dat only For reading into DX |
dx_table2csv |
Read in a time_series.dat file and output a CSV version For reading into DX |
dx_var.general |
Take 2 parameters $1 - Snapshot number (0 = current) $2 - Processor number |
getconf.csh |
Initiate some variables related to MPI and the calling sequence, and do other setup needed by both start.csh and run.csh. |
git-pc |
|
gitci_run |
Simple script for checking in a Pencil Code run directory to a Git repository. |
gpgrowth |
Extract growth information for velocity or B-field from run.log or other file and display via gnuplot. |
mass-changer.pl |
Authors: |
mkdotin |
Given a set of files (normally Makefile and Makefile.local), scan through all lines of the type MAGNETIC=magnetic and construct the files ./start.in, ./run.in (if they don’t exist as yet) corresponding to the moduels which are used and those which are not used. |
mkinpars |
Under OSF1, a newly started csh does not inherit PATH: |
mkproc-tree |
Makes a processor directory tree |
mkwww |
Makes a skeleton for a html file were result of run can be recorded. README, start.in, and run.in are included in file. File is put in the a public directory which is linked to the run directory. Still messy! |
move-slice |
Example: move-slice data2 |
nl2idl |
Convert F90 namelists into an idl function that returns an anomymous structure containing all the namelist variables. |
nl2python |
Convert F90 namelists into a Python class that provides all namelist slots as fields. |
pc_about |
|
pc_auto-test |
Test compilation and results on a set of sample directories to validate the pencil code. Uses Perl because I started to do this with the Test/Test::Harness module and because we need to do pattern matching to extract the relevant output lines. |
pc_autocorrect_config |
|
pc_build |
Compile the Pencil Code, using settings from the ‘Makefile’ section in the appropriate configuration files. |
pc_check_dir |
|
pc_check_revision |
12-nov-2010/dintrans: coded Allow to check old revisions of the code with a given sample –> useful to find the revision that broke a sample that is not daily checked in the auto-test list Results of each successive test are written in: /tmp/(revision number).out_OK –> the revision is OK /tmp/(revision number).out_not_OK –> the revision is not OK then exit |
pc_check_varfile |
Checks if varfile sizes are consistent |
pc_cleansrc |
Removes all symbolic links created by ‘pc_setupsrc’. Removes all compiled executables and other build objects. Localized source files (see pc_localize) are maintained. Data and other files in the run directory are maintained. |
pc_codecov |
Known issues: - Information on which tests access a particular line is not displayed. |
pc_codingstyle |
Fortran95 coding style tester for the Pencil Code style. Currently, only basic checks are performed, e.g. indentation. Feel free to add more tests carefully. |
pc_collect |
Runs a helper executable; builds it first, if necessary |
pc_collect_all |
Script to automatically collect distributed VARN files into one single file that will be stored in data/allprocs. |
pc_collect_exp |
Runs a helper executable; builds it first, if necessary |
pc_config.sh |
Initiate some variables related to MPI and the calling sequence, and do other setup needed by both pc_start and pc_run execution scripts |
pc_configtest |
Script to automatically check correctness of the *.in files. |
pc_copyvar |
Author: Anders Johansen |
pc_copyvar_old |
Author: Anders Johansen |
pc_cvsup |
Script to update the Pencil-Code tree from CVS |
pc_debug |
Compile and run the code with the maximum of available diagnostic options |
pc_deprecated_slice_links |
|
pc_diffruns |
Compare *.in and *.local files of two Pencil Code run directories. |
pc_distribute |
Runs a helper executable; builds it first, if necessary |
pc_distribute_z |
Runs a helper executable; builds it first, if necessary |
pc_dump_config |
Dump the configuration settings. |
pc_edit |
This script is a wrapper for an arbitrary editor $1 working on a file identified by path $2. It checks whether $2 exists in $PENCIL_HOME or any subdirectory down to the 3rd level, and if so, opens the editor with file $PENCIL_HOME/…/$2. For convenience, one would individually define a shell alias like alias <short name>=’pc_edit <preferred editor>’ and then use <short name> <path>. |
pc_extract |
Runs a helper executable; builds it first, if necessary |
pc_findconfig |
This file tries to set the PENCIL_HOME environment variable if it doesn’t exist yet, and then adds stuff to your PATH and IDL_PATH. |
pc_fix_svn_properties |
For all files containing a SVN keywords line, set the corresponding svn:keywords property So far, we handle only <dollar>Id<dollar>, which is probably enough. |
pc_functions.sh |
|
pc_get_param_state |
Evaluate ‘params.log’ and generate a proper ‘run.in’ for a given time. |
pc_git |
|
pc_grep |
Allow to search recursively a given string using grep Usage: pc_grep string suffix By default, suffix=’*.f90’such that pc_grep ‘eos.h’ will search the ‘eos.h’ string in all of f90 files |
pc_helper |
Runs a helper executable; builds it first, if necessary |
pc_inspectrun |
The script prints the header (legend) and the last few lines of the time_series.dat file. |
pc_isolated-test |
DANGER: things can break horribly if you edit this script while it is running. |
pc_jobtransfer |
checks that a valid NEWDIR file exists, and that in the new directory there is another valid NEWDIR file. Only if everything is ok, this script will touch STOP to initialize the job transfer. This script should help wasting precious queue time by having wrong NEWDIR files. |
pc_llsub |
Wrapper script to pass start.csh and run.csh (or both) to IBM Loadleveler God knows why it does not take any useful command line options on its own. (Or does it?) |
pc_localize |
Materialize a link to one or several files or directories (the latter will not work under some unices (but under Linux). |
pc_mkdatadir |
This script generates a link to a data directory with the same name as the current working directory but that is located on a data disk. The name of the desired data disk will be different and different machine, so you may need to add your particular machine name below |
pc_mkproctree |
Makes a processor directory tree |
pc_mkproctree_par |
Makes a processor directory tree |
pc_mkspecial.sh |
Undoes the changes that are automatically made to the source files when multiple special modules are used. See target special_preps in Makefile.src. |
pc_move_var |
Usage: ./pc_move_var SRC DST |
pc_newrun |
This script uses pc_mkdatadir which links the subdirectory data to some data disk (which is machine dependent and therefore you may want to adapt pc_mkdatadir for your particular machine). |
pc_news |
|
pc_nowarn_to_kcq |
A small program to replace all instances of ALWAYS_FALSE with keep_compiler_quiet. Use with extreme care, not all cases are handled automatically. |
pc_pencil_swap |
Check for existence of src/cparam_pencils.inc |
pc_phonelist |
|
pc_piechart |
usage: ‘pc_piechart [rotationangle]’ where rotation angle is a number between 0 and 360 that sets the rotation of the pie chart, which can be set in order to optimize the positioning of the text. For the current version of doc/citations/notes.tex (as of August 2016), 290 works nicely for this parameter. Current copy of plot also available at http://alexrichert.com/graphics |
pc_qsub |
Handle queue submission transparently across different machines |
pc_radmc3d |
Link files into a local radmc3d directory |
pc_reduce |
Runs a helper executable; builds it first, if necessary |
pc_reduce_all |
Script to automatically reduce distributed VARN files into one single file that will be stored in data/reduced. |
pc_rename |
renames a run directory including the link to the data directory |
pc_restore_from_backup |
Wrapper to overwrite var.dat with var.dat.bck |
pc_restrict |
Creates a new run directory for continuation of an existing run, but with restricted z extent, according to the range of z processors [from-z-proc,to-z-proc] provided. If to-z-proc < from-z-proc and the z boundary condition is periodic, the z-extent is interpreted to stretch across the upper z boundary. Invokes pc_newrun. cparam.local, run.in and param.nml are modified to render the new run compile-and-run ready. start.x must not be executed. |
pc_run |
Run the Pencil Code, using settings from the ‘runtime’ section in the appropriate configuration files. |
pc_script_test |
Run tests in tests/ directories. These are normally tests of Python or IDL scripts, or similar. For each directory given, we recursively scan for subdirectories named ‘tests’. If no directories are given, the directories tests/, samples/, runs/ of ${PENCIL_HOME} are used as starting points. |
pc_sed |
Provides workaround for missing –follow-symlinks option of sed. Requires that the file to be edited (typically in-place) is the last argument. |
pc_setupsrc |
Link files into a local src directory Also link script files from the bin directory ==> should be renamed |
pc_start |
Neat wrapper for running start.x through pc_run. |
pc_svn_add_rundir |
Add the current run directory to a SVN repository. Assumes that the directory above (`..’) is already under SVN. |
pc_svn_transfer_changes |
|
pc_svnstatus_ignlinks |
Quick script to ignore symbolic links when getting ‘svn status’. |
pc_svnup |
Script to update the Pencil Code tree from svn. |
pc_tar_run |
This script creates a tar file from the current run. It takes all in and light data files. |
pc_tecplot |
Runs a helper executable; builds it first, if necessary |
pc_tecplot_solid |
Runs a helper executable; builds it first, if necessary |
pc_tsnap |
Extract time information from a snapshot file. Assumes the following to be written to the file: write a write t [,x,y,z] |
pc_update_autotest.sh |
If $PC_SET_VALIDATED is set, then update validated.dat Otherwise, don’t do anything. This script is used by auto-test and pc_auto-test. |
pc_update_validated.sh |
If $PC_SET_VALIDATED is set, then update validated.dat Otherwise, don’t do anything. This script is used by auto-test and pc_auto-test. |
pc_upgraderun |
Transform and validate run.in/start.in/Makefile.local files from older pencil-code incarnations to the current version. |
pc_useutil |
|
pc_videofiles |
Script to automatically generate the slices, if not already done. |
pc_worldmap |
Creates a map of Pencil contributor locations based on $PENCIL_HOME/license/developers.txt Be sure to check out the Python modules used before trying to run it (the most obscure being ‘geopy’: https://pypi.python.org/pypi/geopy). This script requires that license/developers.txt stay perfectly formatted! Also, locations in column 7 of license/developers.txt need to be resolvable *either* with Bing or Google Maps. Current copy of plot also available at http://alexrichert.com/graphics |
pc_xmlexport |
Name: pc_xmlexport Author: Antony Mee (A.J.Mee@ncl.ac.uk) Started: 04-Aug-2005 Usage: Hello |
pencil-test |
Run the pencil code’s auto test on some remote host(s) and wrap results in HTML if required. Can be used from crontab. |
read_all_videofiles |
Runs a helper executable; builds it first, if necessary |
read_vectorfiles |
Runs a helper executable; builds it first, if necessary |
read_videofiles |
Runs a helper executable; builds it first, if necessary |
read_videofiles.csh |
Run read_videofiles.x – to read_videofiles |
read_xyaver_alpha |
Runs a helper executable; builds it first, if necessary |
reaper |
Run a shell script like run.csh and kill it and its child processes after a given time, including subprocesses started via mpirun/mpiexec. CAVEAT: As there is apparently no portable way to processes we initiated via mpirun/mpiexec, we simply kill _any_ process of the given name that didn’t exist when this script started. |
reload |
interface to input information for log file |
remote-top |
does top -bn1 on all procs of nodelist, write to datadir |
restart-new-dir |
Example: restart-new-dir ../hydro256e |
restart-new-dir-VAR |
Example: restart-new-dir ../hydro256e |
restart-new-dir-axel |
Example: restart-new-dir ../hydro256e |
run.csh |
run.csh ——— Run src/run.x (timestepping for src/run.x). Run parameters are set in run.in. |
scp-proc-to-proc |
Purpose: copies directory trees to another machine |
scpdatadir |
make tarball of data directory and secure copy to $1 tarek Nov 26 2002 |
setup-src |
|
start.csh |
start.csh ———– Run src/start.x (initialising f for src/run.x). Start parameters are set in start.in. |
start_run.csh |
start_run.csh ————— Run first src/start.x (unless data/proc0/var.dat already exists) and then src/run.x. On machines with local scratch disks this saves the overhead associated with copying to and from that disk. |
summarize-history |
Evaluate `params.log’ and print a history of changes. |
tar_run |
This script adds a new run to the repository and checks in all *.in files as well as material from the data and src directories. |
tar_run_bash |
This script adds a new run to the repository and checks in all *.in files as well as material from the data and src directories. |