Commit e0226634 authored by adelmann's avatar adelmann 🎗
Browse files

cleanup

parent 07141c68
This diff is collapsed.
#!/bin/sh
###
### add a header and footer comment section to each file listed as an argument
###
if [ $# -lt 1 ]; then
echo "Usage: $0 <file list>"
exit 1
fi
for f in $* ; do
if [ ! -f $f ]; then
echo "Error: Could not find file $f; skipping."
else
echo "Adding header and footer comments to $f ..."
# create temporary filename
fnm=$f.$$
touch $fnm
# write header to temp file
headfnd=`grep "W-7405-ENG-36" $f`
if [ "$headfnd" = "" ]; then
cat << \HEADERCOMMENT >> $fnm
// -*- C++ -*-
/***************************************************************************
*
* The IPPL Framework
*
* This program was prepared by PSI.
* All rights in the program are reserved by PSI.
* Neither PSI nor the author(s)
* makes any warranty, express or implied, or assumes any liability or
* responsibility for the use of this software
*
* Visit http://www.acl.lanl.gov/POOMS for more details
*
***************************************************************************/
HEADERCOMMENT
else
# echo " $f already contains header "
echo " $f already contains header -> I delete the old header."
sed '6,14d' $f > tmp
mv tmp $f
fi
# copy over the file itself to temp file
cat $f >> $fnm
# write footer to temp file
tailfnd=`grep "IPPL_VERSION_ID" $f`
if [ "$tailfnd" = "" ]; then
cat << \FOOTERCOMMENT >> $fnm
/***************************************************************************
* $RCSfile: addheaderfooter,v $ $Author: adelmann $
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:17 $
* IPPL_VERSION_ID: $Id: addheaderfooter,v 1.1.1.1 2003/01/23 07:40:17 adelmann Exp $
***************************************************************************/
FOOTERCOMMENT
else
echo " $f already contains footer text."
fi
# done; move temp file over original file
mv $fnm $f
fi
done
#!/bin/bash
# change [-dm | -ma | -f] <"findStr"> <"replStr"> [<srcFile>]
#
# changes in all .mad* (-dm) or *.mad9p (-ma) files in
# the current directory the string findStr into replStr
# The original file is saved under .save[.mad*|*.mad9p]
#
# Examples:
# change all .mad* in the current directory
# % change -dm "MESHPOINTS_X = 64;" "MESHPOINTS_X = 128;"
#
# change all .mad9p in the current directory
# % change -ma change -ma "Prot:BEAM, KBUNCH=1, NPART=1e6, GAMMA=gamma, BUNCHED=FALSE, PARTICLE=PROTON," \
# "Prot:BEAM, KBUNCH=1, NPART=1e7, GAMMA=gamma, BUNCHED=FALSE, PARTICLE=PROTON,"
#
# change one particular file (.mad-1)
# % change -f "MESHPOINTS_X = 128;" "MESHPOINTS_X = 64;" .mad-1
#
# rename all *.mad9p files and give them a new (base)name and case-numbers
# replace the Title,string= ... with <newTitle>
# % change -ch <newBaseName>
#
# change string (<strToChange>) in all *.mad9p to <newStr>
# % change -str <strToChange> <newStr>
#
rm -f *~ .*~ .*.ch
case "$1" in
-dm)
for file in `ls .mad*`
do
# make script
echo "awk '{if (\$0 ~ /"$2"/ ) print \"$3\" ; else print \$0}'" $file " >" $file".ch" > t
chmod +x ./t
./t
cp $file .save$file
mv $file.ch $file
done
;;
-ma)
for file in `ls *.mad9p`
do
# make script
echo "awk '{if (\$0 ~ /"$2"/ ) print \"$3\" ; else print \$0}'" $file " >" $file".ch" > t
chmod +x ./t
./t
cp $file .save$file
mv $file.ch $file
done
;;
-f)
#file=$4
# make script
#echo "awk '{if (\$0 ~ /"$2"/ ) print \"$3\" ; else print \$0}'" $file " >" $file".ch" > t
#chmod +x ./t
#./t
#cp $file .save$file
#mv $file.ch $file
perl -pi -e "s|$2|$3|g" $4
;;
-ch)
num=0
for file in `ls *.mad9p`
do
num=`expr $num + 1`
echo rename $file to $2-$num.mad9p
mv $file $2-$num.mad9p
done
;;
-str)
for file in `ls *.mad9p`
do
perl -pi -e "s|$2|$3|g" $file
done
;;
-h)
clear
head -25 $0
exit
;;
*)
echo Usage: 'change [-dm | -ma -f] <findStr> <replStr> [<srcFile>]'
esac
rm -f ./t
#!/usr/local/bin/perl
######################################################################
#
# A simple script to scan a list of files and pull out
# tag information about each.
#
# Run with a list of files on the command line.
#
#
# Print the name of the array of strings we'll be building.
#
print "const char *ippl_version_log[] = {\n";
#
# Loop over the input files.
#
$filelist = <>;
chop($filelist);
$itemnum = 0;
foreach $file ( split(/ /,$filelist) ) {
# Open the file.
open(FILE,"<$file") || die("Could not open $file!");
# Strip off the directories above src.
$file =~ s,\S+/src/,,;
# Read through the file.
while (<FILE>) {
# If we find the IPPL_VERSION_ID line
# extract the version number and date.
if ( /IPPL_VERSION_ID: \$Id:\s+\S+\s+(\S+)\s+(\S+)/ ) {
# print out the tag line.
print " \"$file $1 $2\",\n";
# count the number of lines.
$itemnum += 1;
}
}
# Close the file.
close(FILE);
}
# print the trailer for the array of strings.
print " \"\"\n";
print "};\n";
# Spit out setting telling how many filenames there are
print "const unsigned int ippl_version_numfiles = $itemnum;\n";
Solving FEM for laser:
Construct grid.
Generate_processes();
take p_level: 5 max_level: 11
Grid_generation();
I Basic grid generation by edges;
I.2 edge correction;
II Calculation of points and cells;
II.2 construct basic points;
send them;
II.3 fullfill B1B2;
II.4 construct cell points;
II.61 interior cell part 1;
II.62 sends of boundary cells;
II.63 interior cell part 2;
send them;
II.7 calc multigrid points;
II.7 remove exterior points;
II.8 calc interior points;
II.9 send coarse grid points;
III Calculation of boundary;
III.2 boundary cells;
Information about processes:
Number of processes: 2048
Number of active processes: 1884
Initialize_variable();
III.3.1 construct boundary points;
remove edges;
III.4.1 storage for boundary cells;
III.4.2 storage for cells and stencils;
III.4.3 storage for boundary matrices;
IV. calculate lists;
IV. 2. interior points and points near boundary;
IV. 5. pointer in boundary cells;
IV. 6. restriction weights;
IV. 7. coarsest level;
IV. 8. initialize lists;
IV. 9. calc mg;
V.1 prepare evaluation;
V.2 prepare parallel;
a) ;
b) ;
c) ;
end prepare ;
End construct grid.
information about finest level:
------------------------------------
number of interior points is: 392506548
number of points near the boundary: 4271654
number of boundary points: 4283854
number of points in boundary cells: 595235
sum of all points: 401657291
ratio of points interior / near boundary: 42.893407453362
Max_level: 12 Min_level: 1 Min_interior_level: 3 n_parallel: 7
Solving Poisson equation by mg!
Number of smoothings iter + n: 14
Test: 0.892694563582
MG:
--------------------
Iteration: 1 Max: Temp: 4261.420849761022
Solving elasticity by MG-preconditioned cg.
---------------------------------------------
eps cg:0.000100000000
first delta:2.086796494516
Iteration:1. Infty: 0.019095828338 Residuum: 2.354892560695
Iteration:2. Infty: 0.031509741667 Residuum: 1.856654395803
Iteration:3. Infty: 0.030128452497 Residuum: 0.980512974896
Iteration:4. Infty: 0.025129218924 Residuum: 0.553781750411
Iteration:5. Infty: 0.023513940085 Residuum: 0.331651641806
Iteration:6. Infty: 0.023147171281 Residuum: 0.231539317113
Iteration:7. Infty: 0.022699487338 Residuum: 0.199170056654
Iteration:8. Infty: 0.022140922735 Residuum: 0.169681147605
Iteration:9. Infty: 0.021521104162 Residuum: 0.144059334253
Iteration:10. Infty: 0.020754772722 Residuum: 0.132267240420
Iteration:11. Infty: 0.019841949411 Residuum: 0.110175050384
Iteration:12. Infty: 0.019836078839 Residuum: 0.084847873632
Iteration:13. Infty: 0.019963431072 Residuum: 0.070553148250
Iteration:14. Infty: 0.020128251619 Residuum: 0.063612558982
Iteration:15. Infty: 0.020391719464 Residuum: 0.059557588132
Iteration:16. Infty: 0.020957155603 Residuum: 0.057424116725
Iteration:17. Infty: 0.021586949552 Residuum: 0.054720436286
Iteration:18. Infty: 0.022178280392 Residuum: 0.048853043700
Iteration:19. Infty: 0.022772317766 Residuum: 0.041817645044
Iteration:20. Infty: 0.023202072819 Residuum: 0.035397550837
Iteration:21. Infty: 0.023466340048 Residuum: 0.028839564219
Iteration:22. Infty: 0.023612959564 Residuum: 0.023094548037
Iteration:23. Infty: 0.023643017390 Residuum: 0.019616698963
Iteration:24. Infty: 0.023584036531 Residuum: 0.017719880153
Iteration:25. Infty: 0.023584642662 Residuum: 0.015861414929
Iteration:26. Infty: 0.023551464602 Residuum: 0.013597840672
Iteration:27. Infty: 0.023528075134 Residuum: 0.011592581017
Iteration:28. Infty: 0.023483068905 Residuum: 0.010124231662
Iteration:29. Infty: 0.023379106969 Residuum: 0.008813397197
Iteration:30. Infty: 0.023247180387 Residuum: 0.007506021110
Infty: 0.023247180387
Test Boundary, Integrals: -----------
X-Integral: 0.000000000000
Y-Integral: -0.000000000000
Z-Integral: 0.000000000000
X-curl: 0.000000000000
Y-curl: 0.000000000000
Z-curl: -0.000000000058
Residuum Infty: 0.004072047725
Maximum x: 0.009273326449 Minimum x: -0.009410978668
Maximum - Minimum x: 0.018684305118
Maximum y: 0.006958667768 Minimum y: -0.006830413837
Maximum - Minimum y: 0.013789081605
Maximum z: 0.006877533951 Minimum z: -0.006842138849
Maximum - Minimum z: 0.013719672800
Maximum sxx: 3400.789031372667 Minimum sxx: -592.785147984898
total time: 4346.630015969276 sec.
calc time: 2384.246641039848 sec.
end
elastime time: 1727.168569087982 sec.
end
End:
adding counter 5 event 12 Cycles
adding counter 0 event 1 Instructions completed
adding counter 7 event 0 TLB misses
adding counter 2 event 9 Stores completed
adding counter 3 event 5 Loads completed
adding counter 4 event 5 FPU 0 instructions
adding counter 1 event 35 FPU 1 instructions
adding counter 6 event 9 FMAs executed
################################################################################
hpmcount (V 2.4.2) summary (aggregate of 2048 POE tasks)
Average execution time (wall clock time) : 4404.92 seconds
Average amount of time in user mode : 4180.131245 seconds
Average amount of time in system mode : 180.733955 seconds
Total maximum resident set size : 367 Gbytes
Total shared memory use in text segment : 1040761605924 Kbytes*sec
Total unshared memory use in data segment : 4398046509056 Kbytes*sec
PM_CYC (Cycles) : 3.19820557953027e+15
PM_INST_CMPL (Instructions completed) : 2.91983591237161e+15
PM_TLB_MISS (TLB misses) : 2059721424886
PM_ST_CMPL (Stores completed) : 489494881427743
PM_LD_CMPL (Loads completed) : 894276288959814
PM_FPU0_CMPL (FPU 0 instructions) : 24415273106008
PM_FPU1_CMPL (FPU 1 instructions) : 3651753086010
PM_EXEC_FMA (FMAs executed) : 4388818136369
Utilization rate : 94.5231743164063 %
Avg number of loads per TLB miss : 862.436130371094
Load and store operations : 1383771170.402 M
MIPS : 662882.779
Instructions per cycle : 0.912956542968749
HW Float points instructions per Cycle : 0.00886279296875001
Total Floating point instructions + FMAs : 32455844.317 M
Total Float point instructions + FMA rate : 7367.74299999998 Mflip/s
Average FMA percentage : 29.5289506835937 %
Average computation intensity : 0.0266591796875002
################################################################################
# linear elastizitaet Gridpoints processors Ttot Tcalc Telasti
10510366 502 374.073409914970 225.331627011299 174.546079993248
401657291 1884 4346.630015969276 2384.246641039848 1727.168569087982
874510716 4048 4073.628691077232 2270.175686001778 1724.211160063744
\ No newline at end of file
ATTENTION: 0031-408 2048 tasks allocated by LoadLeveler, continuing...
Solving FEM for laser:
Construct grid.
Generate_processes();
take p_level: 5 max_level: 11
Grid_generation();
I Basic grid generation by edges;
I.2 edge correction;
II Calculation of points and cells;
II.2 construct basic points;
send them;
II.3 fullfill B1B2;
II.4 construct cell points;
II.61 interior cell part 1;
II.62 sends of boundary cells;
II.63 interior cell part 2;
send them;
II.7 calc multigrid points;
II.7 remove exterior points;
II.8 calc interior points;
II.9 send coarse grid points;
III Calculation of boundary;
III.2 boundary cells;
Information about processes:
Number of processes: 2048
Number of active processes: 1884
Initialize_variable();
III.3.1 construct boundary points;
remove edges;
III.4.1 storage for boundary cells;
III.4.2 storage for cells and stencils;
III.4.3 storage for boundary matrices;
IV. calculate lists;
IV. 2. interior points and points near boundary;
IV. 5. pointer in boundary cells;
IV. 6. restriction weights;
IV. 7. coarsest level;
IV. 8. initialize lists;
IV. 9. calc mg;
V.1 prepare evaluation;
V.2 prepare parallel;
a) ;
b) ;
c) ;
end prepare ;
End construct grid.
information about finest level:
------------------------------------
number of interior points is: 392506548
number of points near the boundary: 4271654
number of boundary points: 4283854
number of points in boundary cells: 595235
sum of all points: 401657291
ratio of points interior / near boundary: 42.893407453362
Max_level: 12 Min_level: 1 Min_interior_level: 3 n_parallel: 7
Solving Poisson equation by mg!
Number of smoothings iter + n: 14
Test: 0.892694563582
MG:
--------------------
Iteration: 1 Max: Temp: 4261.420849761022
Solving elasticity by MG-preconditioned cg.
---------------------------------------------
eps cg:INF
first delta:2.086796494516
Infty: 0.000001538546
Test Boundary, Integrals: -----------
X-Integral: 0.000000000000
Y-Integral: 0.000000000000
Z-Integral: -0.000000000000
X-curl: -0.000000000000
Y-curl: -0.000000000000
Z-curl: -0.000000000000
Residuum Infty: 0.000216022809
Maximum x: 0.000000491260 Minimum x: -0.000000498095
Maximum - Minimum x: 0.000000989354
Maximum y: 0.000000540852 Minimum y: -0.000000434799
Maximum - Minimum y: 0.000000975652
Maximum z: 0.000000499599 Minimum z: -0.000000467057
Maximum - Minimum z: 0.000000966656
Maximum sxx: 3.821904255968 Minimum sxx: -1764.212441025275
total time: 2388.579353928566 sec.
calc time: 489.145408987999 sec.
end
elastime time: 62.743070960045 sec.
end
End:
adding counter 5 event 12 Cycles
adding counter 0 event 1 Instructions completed
adding counter 7 event 0 TLB misses
adding counter 2 event 9 Stores completed
adding counter 3 event 5 Loads completed
adding counter 4 event 5 FPU 0 instructions
adding counter 1 event 35 FPU 1 instructions
adding counter 6 event 9 FMAs executed
################################################################################
hpmcount (V 2.4.2) summary (aggregate of 2048 POE tasks)
Average execution time (wall clock time) : 2440.71 seconds
Average amount of time in user mode : 2396.047046 seconds
Average amount of time in system mode : 18.088081 seconds
Total maximum resident set size : 367 Gbytes
Total shared memory use in text segment : 316858603260 Kbytes*sec
Total unshared memory use in data segment : 4398046509056 Kbytes*sec
PM_CYC (Cycles) : 1.8338075768891e+15
PM_INST_CMPL (Instructions completed) : 1.9881937965777e+15
PM_TLB_MISS (TLB misses) : 825653461541
PM_ST_CMPL (Stores completed) : 290080172382675
PM_LD_CMPL (Loads completed) : 523384909419696
PM_FPU0_CMPL (FPU 0 instructions) : 4433199534977
PM_FPU1_CMPL (FPU 1 instructions) : 625777617583
PM_EXEC_FMA (FMAs executed) : 1089617770450
Utilization rate : 97.8166850585938 %
Avg number of loads per TLB miss : 1090.03687548828
Load and store operations : 813465081.800999 M
MIPS : 814617.410000002
Instructions per cycle : 1.08418408203125
HW Float points instructions per Cycle : 0.00260253906249994
Total Floating point instructions + FMAs : 6148594.92999999 M
Total Float point instructions + FMA rate : 2519.104 Mflip/s
Average FMA percentage : 35.2940424804688 %
Average computation intensity : 0.00794189453124972
################################################################################
ATTENTION: 0031-408 2048 tasks allocated by LoadLeveler, continuing...
Solving FEM for laser:
Construct grid.
Generate_processes();
take p_level: 5 max_level: 11
Grid_generation();
I Basic grid generation by edges;
I.2 edge correction;
II Calculation of points and cells;
II.2 construct basic points;
send them;
II.3 fullfill B1B2;
II.4 construct cell points;
II.61 interior cell part 1;
II.62 sends of boundary cells;
II.63 interior cell part 2;
send them;
II.7 calc multigrid points;
II.7 remove exterior points;
II.8 calc interior points;
II.9 send coarse grid points;
III Calculation of boundary;
III.2 boundary cells;
Information about processes:
Number of processes: 2048
Number of active processes: 1884
Initialize_variable();
III.3.1 construct boundary points;
remove edges;
III.4.1 storage for boundary cells;
III.4.2 storage for cells and stencils;
III.4.3 storage for boundary matrices;
IV. calculate lists;
IV. 2. interior points and points near boundary;
IV. 5. pointer in boundary cells;
IV. 6. restriction weights;
IV. 7. coarsest level;
IV. 8. initialize lists;
IV. 9. calc mg;
V.1 prepare evaluation;
V.2 prepare parallel;
a) ;
b) ;
c) ;
end prepare ;
End construct grid.
information about finest level:
------------------------------------
number of interior points is: 392506548
number of points near the boundary: 4271654
number of boundary points: 4283854
number of points in boundary cells: 595235
sum of all points: 401657291
ratio of points interior / near boundary: 42.893407453362
Max_level: 12 Min_level: 1 Min_interior_level: 3 n_parallel: 7
Solving Poisson equation by mg!
Number of smoothings iter + n: 14
Test: 0.892694563582
MG:
--------------------
Iteration: 1 Max: Temp: 4261.420849761022
Solving elasticity by MG-preconditioned cg.
---------------------------------------------
eps cg:0.000100000000
first delta:2.086796494516
Iteration:1. Infty: 0.019095828338 Residuum: 2.354892560695
Iteration:2. Infty: 0.031509741667 Residuum: 1.856654395803
Iteration:3. Infty: 0.030128452497 Residuum: 0.980512974896
Iteration:4. Infty: 0.025129218924 Residuum: 0.553781750411
Iteration:5. Infty: 0.023513940085 Residuum: 0.331651641806
Iteration:6. Infty: 0.023147171281 Residuum: 0.231539317113
Iteration:7. Infty: 0.022699487338 Residuum: 0.199170056654
Iteration:8. Infty: 0.022140922735 Residuum: 0.169681147605
Iteration:9. Infty: 0.021521104162 Residuum: 0.144059334253
Iteration:10. Infty: 0.020754772722 Residuum: 0.132267240420
Iteration:11. Infty: 0.019841949411 Residuum: 0.110175050384
Iteration:12. Infty: 0.019836078839 Residuum: 0.084847873632
Iteration:13. Infty: 0.019963431072 Residuum: 0.070553148250
Iteration:14. Infty: 0.020128251619 Residuum: 0.063612558982
Iteration:15. Infty: 0.020391719464 Residuum: 0.059557588132
Iteration:16. Infty: 0.020957155603 Residuum: 0.057424116725
Iteration:17. Infty: 0.021586949552 Residuum: 0.054720436286
Iteration:18. Infty: 0.022178280392 Residuum: 0.048853043700
Iteration:19. Infty: 0.022772317766 Residuum: 0.041817645044
Iteration:20. Infty: 0.023202072819 Residuum: 0.035397550837
Iteration:21. Infty: 0.023466340048 Residuum: 0.028839564219
Iteration:22. Infty: 0.023612959564 Residuum: 0.023094548037
Iteration:23. Infty: 0.023643017390 Residuum: 0.019616698963
Iteration:24. Infty: 0.023584036531 Residuum: 0.017719880153
Iteration:25. Infty: 0.023584642662 Residuum: 0.015861414929
Iteration:26. Infty: 0.023551464602 Residuum: 0.013597840672
Iteration:27. Infty: 0.023528075134 Residuum: 0.011592581017
Iteration:28. Infty: 0.023483068905 Residuum: 0.010124231662
Iteration:29. Infty: 0.023379106969 Residuum: 0.008813397197
Iteration:30. Infty: 0.023247180387 Residuum: 0.007506021110
Infty: 0.023247180387
Test Boundary, Integrals: -----------
X-Integral: 0.000000000000
Y-Integral: -0.000000000000