Victor Ruehle
Revision as of 12:58, 13 May 2019 by Adk44 (talk | contribs) (Created page with "Here is a collection of wiki pages I find usefule or am working on: == General == * Mercurial * Wales Group Fortran conventions for group software == Crystal struc...")
Here is a collection of wiki pages I find usefule or am working on:
General
Crystal structure prediction
- Preparing DMACRYS input
- DMAGMIN setup (basics setup)
- PYGMIN & DMACRYS (current testing / development version with all newer features)
GMIN
OPTIM
- Internal coordinates and rigid bonds (cancelled project, did now give any improvements)
Dirty hacks
Detect name clashes for COMMON blocks
THIS CHECK IS NOT SUIFFICIENT! A note at the beginning, for any new stuff: Do NOT use common blocks, use modules instead!!
One ugly cause which can lead to problems when combinind 2 fortran programs are name clashes in common blocks. I wrote a simple quick and dirty script to detect whether two programs have identically named common blocks. There is no guarantee whether this catches everything, but worth a quick try
The first script findcommons.sh parses all named common blocks in a list of file
#!/bin/bash
tmpfile=$(mktemp) for filter in $@; do find . -name "$filter" -exec sed -ne 's/^\s*[Cc][Oo][Mm][Mm][Oo][Nn]\s*\/\s*\([^\/]*\)\s*\/.*$/\1/p' {} \; >> $tmpfile done sort --ignore-case --unique -u ${tmpfile}
To use it
cd /source/of/proc/one findcommons.sh *.f *.f90 *.F *.F90 *.src > commons.txt cd /source/of/proc/two source/to/proc/one>findcommons.sh *.f *.f90 *.F *.F90 *.src > commons.txt # now check whether there are mulsiple occurencies cat /source/of/proc/one/commons.txt /source/of/proc/two/commons.txt | sort --ignore-case | uniq -c --ignore-case | sed -e '/^\s*1/d'