Broke up copyright.*
authorMark Abraham <mark.j.abraham@gmail.com>
Wed, 11 Nov 2015 21:23:35 +0000 (22:23 +0100)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Sat, 12 Dec 2015 03:17:02 +0000 (04:17 +0100)
Split unrelated content into binaryinformation.* and pleasecite.*, and
move them to utility/.  This removes functionality from fileio that does
not really belong there, and helps in removing cyclic dependencies.

One new cyclic dependency suppressed for now; it will disappear with
simplification of gmx_invsqrt().

Part of #1415.

Change-Id: I65f07768d46852783d30cf1a28dd22d614dde125

50 files changed:
docs/doxygen/cycle-suppressions.txt
src/gromacs/commandline/cmdlinemodulemanager-impl.h
src/gromacs/fileio/matio.cpp
src/gromacs/fileio/xvgr.cpp
src/gromacs/gmxana/gmx_anadock.cpp
src/gromacs/gmxana/gmx_analyze.cpp
src/gromacs/gmxana/gmx_angle.cpp
src/gromacs/gmxana/gmx_densorder.cpp
src/gromacs/gmxana/gmx_dielectric.cpp
src/gromacs/gmxana/gmx_dipoles.cpp
src/gromacs/gmxana/gmx_dos.cpp
src/gromacs/gmxana/gmx_dyecoupl.cpp
src/gromacs/gmxana/gmx_energy.cpp
src/gromacs/gmxana/gmx_hbond.cpp
src/gromacs/gmxana/gmx_nmeig.cpp
src/gromacs/gmxana/gmx_pme_error.cpp
src/gromacs/gmxana/gmx_rms.cpp
src/gromacs/gmxana/gmx_sans.cpp
src/gromacs/gmxana/gmx_saxs.cpp
src/gromacs/gmxana/gmx_trjconv.cpp
src/gromacs/gmxana/gmx_wham.cpp
src/gromacs/gmxana/pp2shift.cpp
src/gromacs/gmxlib/disre.cpp
src/gromacs/gmxlib/main.cpp
src/gromacs/gmxlib/network.cpp
src/gromacs/gmxlib/orires.cpp
src/gromacs/gmxlib/readinp.cpp
src/gromacs/gmxpreprocess/pdb2top.cpp
src/gromacs/gmxpreprocess/x2top.cpp
src/gromacs/mdlib/clincs.cpp
src/gromacs/mdlib/constr.cpp
src/gromacs/mdlib/forcerec.cpp
src/gromacs/mdlib/mdoutf.cpp
src/gromacs/mdlib/rf_util.cpp
src/gromacs/mdlib/sim_util.cpp
src/gromacs/pulling/pull.cpp
src/gromacs/pulling/pull_rotation.cpp
src/gromacs/swap/swapcoords.cpp
src/gromacs/topology/atomprop.cpp
src/gromacs/trajectoryanalysis/modules/freevolume.cpp
src/gromacs/trajectoryanalysis/modules/sasa.cpp
src/gromacs/utility/CMakeLists.txt
src/gromacs/utility/binaryinformation.cpp [new file with mode: 0644]
src/gromacs/utility/binaryinformation.h [moved from src/gromacs/fileio/copyrite.h with 93% similarity]
src/gromacs/utility/cuda_version_information.cu [moved from src/gromacs/gmxlib/cuda_tools/copyrite_gpu.cu with 97% similarity]
src/gromacs/utility/cuda_version_information.h [new file with mode: 0644]
src/gromacs/utility/pleasecite.cpp [moved from src/gromacs/fileio/copyrite.cpp with 62% similarity]
src/gromacs/utility/pleasecite.h [new file with mode: 0644]
src/programs/mdrun/repl_ex.cpp
src/programs/mdrun/runner.cpp

index 258d57b76859fb9bdf563f0de9d56008ce8c489d..e77d4d4f3f13064b8dbca59918b75c22d2ab7efc 100644 (file)
@@ -18,3 +18,4 @@ pbcutil -> fileio
 pbcutil -> gmxlib
 pbcutil -> mdtypes
 listed-forces -> mdlib
+utility -> math
index e3ac13c196ced3205cac45a71f8d4d44228035ea..53b54c8664ffdeec330796ec92391c7ad7ee2641 100644 (file)
@@ -49,8 +49,8 @@
 
 #include "gromacs/commandline/cmdlinemodule.h"
 #include "gromacs/commandline/cmdlinemodulemanager.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/options/options.h"
+#include "gromacs/utility/binaryinformation.h"
 #include "gromacs/utility/classhelpers.h"
 #include "gromacs/utility/gmxassert.h"
 
index de4a0087281499419f8e8ba3a9abb16781d9bc7c..4fb86f27f1f8d26d84e664e6bd19bb3c529b2b5d 100644 (file)
@@ -45,9 +45,9 @@
 
 #include <algorithm>
 
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/math/utilities.h"
+#include "gromacs/utility/binaryinformation.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/fatalerror.h"
index 623d81594d3fcc3ca608337e9ff27ea85622ec8f..6034a4f811eaa2e3f3cc8155647d2f9e9d8a494d 100644 (file)
 
 #include <string>
 
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/oenv.h"
 #include "gromacs/math/vec.h"
+#include "gromacs/utility/binaryinformation.h"
 #include "gromacs/utility/coolstuff.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/exceptions.h"
index 3121a5d4754424e5f76f5215d47dbdb43c86e66a..f1f3e6a6cc950abeba3bc0439332fcd66a03dee8 100644 (file)
@@ -42,7 +42,6 @@
 
 #include "gromacs/commandline/pargs.h"
 #include "gromacs/fileio/confio.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxana/gmx_ana.h"
 #include "gromacs/math/vec.h"
@@ -52,6 +51,7 @@
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 
 static const char *etitles[] = { "E-docked", "Free Energy" };
index 2c4d9051bd382447650d183f6d92d51b23591d08..3d5f518dcbcaca82e853eed4772288c57ca5a77e 100644 (file)
@@ -45,7 +45,6 @@
 #include "gromacs/correlationfunctions/autocorr.h"
 #include "gromacs/correlationfunctions/expfit.h"
 #include "gromacs/correlationfunctions/integrate.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxana/gmx_ana.h"
 #include "gromacs/gmxana/gstat.h"
@@ -56,6 +55,7 @@
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 #include "gromacs/utility/snprintf.h"
 
index 0f44226df9e88c592402689b4700fafdc24d4fb4..3d80abbfb7e22d60c72897fcf11507358b34f7f7 100644 (file)
@@ -44,7 +44,6 @@
 #include "gromacs/commandline/pargs.h"
 #include "gromacs/commandline/viewit.h"
 #include "gromacs/correlationfunctions/autocorr.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/trrio.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxana/gmx_ana.h"
@@ -56,6 +55,7 @@
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
 #include "gromacs/utility/gmxassert.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 
 static void dump_dih_trr(int nframes, int nangles, real **dih, const char *fn,
index 3182fc2483b18aa20bcf0dc8b18bacd58acae2ef..669437060edf81a4f9a6a91a44ed68e9c97d8f37 100644 (file)
@@ -41,7 +41,6 @@
 #include "gromacs/commandline/pargs.h"
 #include "gromacs/correlationfunctions/autocorr.h"
 #include "gromacs/correlationfunctions/expfit.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/matio.h"
 #include "gromacs/fileio/tpxio.h"
 #include "gromacs/fileio/trxio.h"
@@ -58,6 +57,7 @@
 #include "gromacs/topology/index.h"
 #include "gromacs/topology/topology.h"
 #include "gromacs/utility/arraysize.h"
+#include "gromacs/utility/binaryinformation.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/fatalerror.h"
index 4537d266e3cd1af6a9335b408c8b7e36a2f8b568..fe9c9072ed54594e91878ec9ca2cd3f2ca1204b5 100644 (file)
@@ -47,7 +47,6 @@
 #include "gromacs/correlationfunctions/expfit.h"
 #include "gromacs/correlationfunctions/integrate.h"
 #include "gromacs/fft/fft.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxana/gmx_ana.h"
 #include "gromacs/gmxana/gstat.h"
@@ -56,6 +55,7 @@
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 
 /* Determines at which point in the array the fit should start */
index 962a223eb0c48127a83c2ca62ec00e5f82eae43f..9f3c88bc1efac3f85c6df0d6579d9e053b67e885 100644 (file)
@@ -45,7 +45,6 @@
 #include "gromacs/commandline/viewit.h"
 #include "gromacs/correlationfunctions/autocorr.h"
 #include "gromacs/fileio/confio.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/enxio.h"
 #include "gromacs/fileio/matio.h"
 #include "gromacs/fileio/tpxio.h"
@@ -65,6 +64,7 @@
 #include "gromacs/topology/index.h"
 #include "gromacs/topology/topology.h"
 #include "gromacs/utility/arraysize.h"
+#include "gromacs/utility/binaryinformation.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/fatalerror.h"
index d94899a28c1c162cb8b4c27138425ae45f481008..232c75cf4edebf2017171b8e05f7ea2cab8b9035 100644 (file)
@@ -45,7 +45,6 @@
 #include "gromacs/correlationfunctions/integrate.h"
 #include "gromacs/fft/fft.h"
 #include "gromacs/fileio/confio.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/trx.h"
 #include "gromacs/fileio/trxio.h"
@@ -59,6 +58,7 @@
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 
 enum {
index 1cff5d81fcdfe2ad290d0b133b3ede5b2b6ccff4..08b97e8ca3a8b0b3be59b7dc1d71167ec1994e5a 100644 (file)
@@ -36,7 +36,6 @@
 
 #include "gromacs/commandline/filenm.h"
 #include "gromacs/commandline/pargs.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/trx.h"
 #include "gromacs/fileio/trxio.h"
 #include "gromacs/fileio/xvgr.h"
@@ -47,6 +46,7 @@
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 
 int gmx_dyecoupl(int argc, char *argv[])
index ea5eeadc979b71b925924c69b955ddbb65516e1c..84b85696df4c3dcf594e7db85f21b2d921b2aa3d 100644 (file)
@@ -45,7 +45,6 @@
 #include "gromacs/commandline/pargs.h"
 #include "gromacs/commandline/viewit.h"
 #include "gromacs/correlationfunctions/autocorr.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/enxio.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/tpxio.h"
@@ -64,6 +63,7 @@
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/gmxassert.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 
 static real       minthird = -1.0/3.0, minsixth = -1.0/6.0;
index 548b6c4d51b3dab34b927c60caac6c41d62c45e0..2af41a655771798f627e497c250388ff33ae78de 100644 (file)
@@ -50,7 +50,6 @@
 #include "gromacs/correlationfunctions/crosscorr.h"
 #include "gromacs/correlationfunctions/expfit.h"
 #include "gromacs/correlationfunctions/integrate.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/matio.h"
 #include "gromacs/fileio/tpxio.h"
 #include "gromacs/fileio/trxio.h"
@@ -69,6 +68,7 @@
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
 #include "gromacs/utility/gmxomp.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/programcontext.h"
 #include "gromacs/utility/smalloc.h"
 #include "gromacs/utility/snprintf.h"
index 1fc7e3caa5498a54192dabcfd1c27d763aa1ec74..40b96458e20a73cb8398696f9a3a7f81e58fc73a 100644 (file)
@@ -40,7 +40,6 @@
 #include <cstring>
 
 #include "gromacs/commandline/pargs.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/mtxio.h"
 #include "gromacs/fileio/tpxio.h"
 #include "gromacs/fileio/xvgr.h"
@@ -57,6 +56,7 @@
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/futil.h"
 #include "gromacs/utility/gmxassert.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 
 static double cv_corr(double nu, double T)
index 323c65ee831d58f4c7238c0ddfa7303cdad9d618..00abb4ff9843a9679ec2d77532b1acb96d0afb98 100644 (file)
@@ -42,7 +42,6 @@
 
 #include "gromacs/commandline/pargs.h"
 #include "gromacs/fileio/checkpoint.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/tpxio.h"
 #include "gromacs/gmxana/gmx_ana.h"
 #include "gromacs/gmxlib/calcgrid.h"
@@ -59,6 +58,7 @@
 #include "gromacs/topology/topology.h"
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 
 /* We use the same defines as in broadcaststructs.cpp here */
index c94b764434ccffe9440c4f351078cbf7ef36444d..5a0a73886211bd26ef83b8843bdcc29e045075cf 100644 (file)
@@ -44,7 +44,6 @@
 #include "gromacs/commandline/pargs.h"
 #include "gromacs/commandline/viewit.h"
 #include "gromacs/fileio/confio.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/matio.h"
 #include "gromacs/fileio/trxio.h"
 #include "gromacs/fileio/xvgr.h"
@@ -60,6 +59,7 @@
 #include "gromacs/utility/arraysize.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 
 static void norm_princ(t_atoms *atoms, int isize, int *index, int natoms,
index 73e6306f2e7166e01561cc035a3f6a08c2f9d9a7..2d3bb3408cde68d7c791fb1af03cedb014b0a579 100644 (file)
@@ -39,7 +39,6 @@
 
 #include "gromacs/commandline/pargs.h"
 #include "gromacs/fileio/confio.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/trxio.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxana/gmx_ana.h"
@@ -55,6 +54,7 @@
 #include "gromacs/utility/futil.h"
 #include "gromacs/utility/gmxassert.h"
 #include "gromacs/utility/gmxomp.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 
 int gmx_sans(int argc, char *argv[])
index 74b07dd8df791e04449e23f4447e74f7a89b5c65..61581d7882cfab91c1654129c0e8536d4f59592b 100644 (file)
 #include <cmath>
 
 #include "gromacs/commandline/pargs.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/gmxana/gmx_ana.h"
 #include "gromacs/gmxana/sfactor.h"
 #include "gromacs/utility/arraysize.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 
 int gmx_saxs(int argc, char *argv[])
index 643ca6eaac689f2156892b94987912af3b062d10..a4b0172910915df3fe7fe79146bab7ed11e96c69 100644 (file)
@@ -45,7 +45,6 @@
 #include "gromacs/commandline/pargs.h"
 #include "gromacs/commandline/viewit.h"
 #include "gromacs/fileio/confio.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/g96io.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/groio.h"
index 25856fad41466fe5a2ec1c128fc0e11eb79288fc..46631bfbce73aa03586ac9504f90e74159b3c8fe 100644 (file)
@@ -54,7 +54,6 @@
 #include <sstream>
 
 #include "gromacs/commandline/pargs.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/tpxio.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxana/gmx_ana.h"
@@ -69,6 +68,7 @@
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
 #include "gromacs/utility/gmxomp.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 
 //! longest file names allowed in input files
index dc6cbdcbbbc879562c501d63693425e8376d3304..46eab8301ccbc80ac0b5dd686af12e918b8e3fc7 100644 (file)
 
 #include <algorithm>
 
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/matio.h"
 #include "gromacs/gmxana/gstat.h"
 #include "gromacs/math/units.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 
 typedef struct {
index 99c9e69ce96057e0b63938d5792bc0363865e9c2..90443ff7f638231e2624cdbab1cc101024e8041e 100644 (file)
@@ -47,7 +47,6 @@
 
 #include <algorithm>
 
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/gmxlib/main.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/math/vec.h"
@@ -62,6 +61,7 @@
 #include "gromacs/topology/topology.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 
 void init_disres(FILE *fplog, const gmx_mtop_t *mtop,
index 1fea4058559d4e8be698f783b74f522a52f0acd1..10180d1a848df4321b6a5f9ce9d82ae6375d3ef3 100644 (file)
 #include <cstring>
 
 #include "gromacs/commandline/filenm.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/mdtypes/commrec.h"
+#include "gromacs/utility/binaryinformation.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/fatalerror.h"
index 901ec23cdb4192f2661143dc60f87ae7e06eb3d7..4bd369e0ef535c253a318a34256ec65f091e05c0 100644 (file)
@@ -46,7 +46,6 @@
 #include <cstring>
 
 #include "gromacs/commandline/filenm.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/mdtypes/commrec.h"
 #include "gromacs/utility/basenetwork.h"
 #include "gromacs/utility/cstringutil.h"
index b34a66414c5dee34e45d0c8e4ec5d5b4a0fbaf4b..9ecf47c348c9761e991fab6ab202267b423e3e4b 100644 (file)
@@ -40,7 +40,6 @@
 
 #include <cmath>
 
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/gmxlib/ifunc.h"
 #include "gromacs/gmxlib/main.h"
 #include "gromacs/gmxlib/network.h"
@@ -57,6 +56,7 @@
 #include "gromacs/topology/mtop_util.h"
 #include "gromacs/topology/topology.h"
 #include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 
 void init_orires(FILE *fplog, const gmx_mtop_t *mtop,
index 900de550a30007783ea9f88e51a92a824860ba85..b2ea077355d24778d3a330ba0a7f49112d9e4263 100644 (file)
 
 #include <algorithm>
 
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/gmxlib/warninp.h"
 #include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/utility/binaryinformation.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/fatalerror.h"
index 00073858846103a7a211438abacfeced7b0c6365..dd9cb064fdb6ad25750d15fdb49b9ddee55976b2 100644 (file)
@@ -48,7 +48,6 @@
 #include <string>
 #include <vector>
 
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/pdbio.h"
 #include "gromacs/gmxpreprocess/add_par.h"
 #include "gromacs/gmxpreprocess/fflibutil.h"
@@ -65,6 +64,7 @@
 #include "gromacs/math/vec.h"
 #include "gromacs/topology/residuetypes.h"
 #include "gromacs/topology/symtab.h"
+#include "gromacs/utility/binaryinformation.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/dir_separator.h"
 #include "gromacs/utility/exceptions.h"
index 1ae7e7cb8fd84ffa652e6f7a19f6632a3851df65..31fdd277a371cceac26da8ca86c9b2b1880e3255 100644 (file)
@@ -42,7 +42,6 @@
 
 #include "gromacs/commandline/pargs.h"
 #include "gromacs/fileio/confio.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/gmxlib/readinp.h"
 #include "gromacs/gmxpreprocess/gen_ad.h"
index 129f3edac67e8bf89fd511b9a4a61e4ab939d5d0..c7520ce6f4ded8bc8481f3b47b692d8e6188bd67 100644 (file)
@@ -48,7 +48,6 @@
 
 #include "gromacs/domdec/domdec.h"
 #include "gromacs/domdec/domdec_struct.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/gmxlib/gmx_omp_nthreads.h"
 #include "gromacs/gmxlib/nrnb.h"
 #include "gromacs/math/units.h"
@@ -69,6 +68,7 @@
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/gmxomp.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 
 #if GMX_SIMD_HAVE_REAL
index 09056dc4ad5a63e14c5d574df2051e85e17dadfd..289509e704da4dcf0e419a50ac7b09e28777dccd 100644 (file)
@@ -49,7 +49,6 @@
 #include "gromacs/domdec/domdec_struct.h"
 #include "gromacs/essentialdynamics/edsam.h"
 #include "gromacs/fileio/confio.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/pdbio.h"
 #include "gromacs/gmxlib/gmx_omp_nthreads.h"
@@ -66,6 +65,7 @@
 #include "gromacs/topology/mtop_util.h"
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 #include "gromacs/utility/txtdump.h"
 
index bc1eb72dc916763845e3b61648bbdaf8e33efac3..135856087cc1f4b7da93c852a5ba40194dcc214c 100644 (file)
@@ -51,7 +51,6 @@
 #include "gromacs/domdec/domdec.h"
 #include "gromacs/domdec/domdec_struct.h"
 #include "gromacs/ewald/ewald.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/filetypes.h"
 #include "gromacs/fileio/trx.h"
 #include "gromacs/gmxlib/gmx_detect_hardware.h"
@@ -88,6 +87,7 @@
 #include "gromacs/topology/mtop_util.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 #include "gromacs/utility/stringutil.h"
 
index 96b6bd6528f68066777edf7d8e792aa30f6cbbf0..281af8c12bd9d75ec3b4f27bb8f1ecfdd0f6971f 100644 (file)
@@ -40,7 +40,6 @@
 #include "gromacs/domdec/domdec.h"
 #include "gromacs/domdec/domdec_struct.h"
 #include "gromacs/fileio/checkpoint.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/tngio.h"
 #include "gromacs/fileio/trrio.h"
@@ -53,6 +52,7 @@
 #include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 
 struct gmx_mdoutf {
index c579dd770e88076cb2bec82c0bbf6e284cfeb24b..1b3d4b4d0e6f071b97704df925896b3c6b059600 100644 (file)
@@ -38,7 +38,6 @@
 
 #include <cmath>
 
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/math/units.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/force.h"
@@ -49,6 +48,7 @@
 #include "gromacs/pbcutil/pbc.h"
 #include "gromacs/topology/topology.h"
 #include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/pleasecite.h"
 
 real RF_excl_correction(const t_forcerec *fr, t_graph *g,
                         const t_mdatoms *mdatoms, const t_blocka *excl,
index 5104aec1bf174e5f54c544fa1d349c19a69109ea..f0bca8e196da8ca321916028a2619b74bedb9aae 100644 (file)
@@ -51,7 +51,6 @@
 #include "gromacs/domdec/domdec_struct.h"
 #include "gromacs/essentialdynamics/edsam.h"
 #include "gromacs/ewald/pme.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/gmxlib/chargegroup.h"
 #include "gromacs/gmxlib/disre.h"
 #include "gromacs/gmxlib/gmx_omp_nthreads.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/gmxassert.h"
 #include "gromacs/utility/gmxmpi.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 #include "gromacs/utility/sysinfo.h"
 
index 8d690d68473aae87749badd8f0de25e09a535586..6b7c55c56574631b484c256d9fdffd1a4fa82f61 100644 (file)
@@ -51,7 +51,6 @@
 #include "gromacs/commandline/filenm.h"
 #include "gromacs/domdec/domdec_struct.h"
 #include "gromacs/domdec/ga2la.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxlib/network.h"
@@ -69,6 +68,7 @@
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
 #include "gromacs/utility/gmxassert.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/real.h"
 #include "gromacs/utility/smalloc.h"
 
index 76978a55e868c684a77d175175c74fad19534947..3275e7d2d5bf2eb311c810eb66b351c4e6da3178 100644 (file)
@@ -50,7 +50,6 @@
 #include "gromacs/domdec/domdec.h"
 #include "gromacs/domdec/domdec_struct.h"
 #include "gromacs/domdec/ga2la.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxlib/network.h"
@@ -66,6 +65,7 @@
 #include "gromacs/timing/wallcycle.h"
 #include "gromacs/topology/mtop_util.h"
 #include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/qsort_threadsafe.h"
 #include "gromacs/utility/smalloc.h"
 
index ac5d746a74637233830b03021b70ac765a5037db..09f97d3cc4de81a9646140e6864c0872faf79417 100644 (file)
@@ -51,7 +51,6 @@
 
 #include "gromacs/domdec/domdec_struct.h"
 #include "gromacs/fileio/confio.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/gmxfio.h"
 #include "gromacs/fileio/xvgr.h"
 #include "gromacs/gmxlib/network.h"
@@ -67,6 +66,7 @@
 #include "gromacs/topology/topology.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 #include "gromacs/utility/snprintf.h"
 
index 6904b241ec8f9d58f6b49722cc5159ef27a1dfcf..0fda312f0d82f6b8e27810ca688fdf3296276c16 100644 (file)
 
 #include <cmath>
 
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/math/utilities.h"
 #include "gromacs/topology/residuetypes.h"
 #include "gromacs/utility/cstringutil.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/futil.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/programcontext.h"
 #include "gromacs/utility/smalloc.h"
 #include "gromacs/utility/strdb.h"
index e151593c4495b927004942b35a10135eebd02f0c..372339e042ba737a4374e1c7d08b367bf758b5e0 100644 (file)
@@ -48,7 +48,6 @@
 #include "gromacs/analysisdata/analysisdata.h"
 #include "gromacs/analysisdata/modules/average.h"
 #include "gromacs/analysisdata/modules/plot.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/trx.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/options/basicoptions.h"
@@ -64,6 +63,7 @@
 #include "gromacs/trajectoryanalysis/analysissettings.h"
 #include "gromacs/utility/arrayref.h"
 #include "gromacs/utility/exceptions.h"
+#include "gromacs/utility/pleasecite.h"
 
 namespace gmx
 {
index d8084c82ad472b74e1c6c8bfc4e867c47e0e0f9f..76764a14f66bcd8c6bc4bd998b85fc87596a18a7 100644 (file)
@@ -53,7 +53,6 @@
 #include "gromacs/analysisdata/modules/average.h"
 #include "gromacs/analysisdata/modules/plot.h"
 #include "gromacs/fileio/confio.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/pdbio.h"
 #include "gromacs/fileio/trx.h"
 #include "gromacs/math/units.h"
@@ -71,6 +70,7 @@
 #include "gromacs/trajectoryanalysis/analysissettings.h"
 #include "gromacs/utility/exceptions.h"
 #include "gromacs/utility/futil.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/scoped_cptr.h"
 #include "gromacs/utility/smalloc.h"
 #include "gromacs/utility/stringutil.h"
index 11e3e33b886d302547db302e6f93054755b87136..a8ffd8405958b21161c7b4036a5e7990f203f863 100644 (file)
@@ -33,6 +33,9 @@
 # the research papers on the package. Check out http://www.gromacs.org.
 
 file(GLOB UTILITY_SOURCES *.cpp)
+if (GMX_GPU AND NOT GMX_USE_OPENCL)
+    gmx_add_libgromacs_sources(cuda_version_information.cu)
+endif()
 set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${UTILITY_SOURCES} PARENT_SCOPE)
 
 gmx_install_headers(
diff --git a/src/gromacs/utility/binaryinformation.cpp b/src/gromacs/utility/binaryinformation.cpp
new file mode 100644 (file)
index 0000000..c9899d8
--- /dev/null
@@ -0,0 +1,385 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
+ * Copyright (c) 2001-2004, The GROMACS development team.
+ * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*! \internal \file
+ * \brief Implements functionality for printing information about the
+ * currently running binary
+ *
+ * \ingroup module_utility
+ */
+#include "gmxpre.h"
+
+#include "binaryinformation.h"
+
+#include "config.h"
+
+#if GMX_FFT_FFTW3
+// Needed for construction of the FFT library description string
+#include <fftw3.h>
+#endif
+
+#ifdef HAVE_LIBMKL
+#include <mkl.h>
+#endif
+
+#if HAVE_EXTRAE
+#include <extrae_user_events.h>
+#endif
+
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+
+#include <algorithm>
+
+/* This file is completely threadsafe - keep it that way! */
+
+#include "buildinfo.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/utility/arraysize.h"
+#include "gromacs/utility/baseversion.h"
+#include "gromacs/utility/exceptions.h"
+#include "gromacs/utility/gmxassert.h"
+#include "gromacs/utility/programcontext.h"
+#include "gromacs/utility/stringutil.h"
+
+#include "cuda_version_information.h"
+
+namespace
+{
+
+//! \cond Doxygen does not need to care about most of this stuff, and the macro usage is painful to document
+
+int centeringOffset(int width, int length)
+{
+    return std::max(width - length, 0) / 2;
+}
+
+void printCentered(FILE *fp, int width, const char *text)
+{
+    const int offset = centeringOffset(width, std::strlen(text));
+    fprintf(fp, "%*s%s", offset, "", text);
+}
+
+void printCopyright(FILE *fp)
+{
+    static const char * const Contributors[] = {
+        "Emile Apol",
+        "Rossen Apostolov",
+        "Herman J.C. Berendsen",
+        "Par Bjelkmar",
+        "Aldert van Buuren",
+        "Rudi van Drunen",
+        "Anton Feenstra",
+        "Gerrit Groenhof",
+        "Christoph Junghans",
+        "Anca Hamuraru",
+        "Vincent Hindriksen",
+        "Dimitrios Karkoulis",
+        "Peter Kasson",
+        "Jiri Kraus",
+        "Carsten Kutzner",
+        "Per Larsson",
+        "Justin A. Lemkul",
+        "Magnus Lundborg",
+        "Pieter Meulenhoff",
+        "Erik Marklund",
+        "Teemu Murtola",
+        "Szilard Pall",
+        "Sander Pronk",
+        "Roland Schulz",
+        "Alexey Shvetsov",
+        "Michael Shirts",
+        "Alfons Sijbers",
+        "Peter Tieleman",
+        "Teemu Virolainen",
+        "Christian Wennberg",
+        "Maarten Wolf"
+    };
+    static const char * const CopyrightText[] = {
+        "Copyright (c) 1991-2000, University of Groningen, The Netherlands.",
+        "Copyright (c) 2001-2015, The GROMACS development team at",
+        "Uppsala University, Stockholm University and",
+        "the Royal Institute of Technology, Sweden.",
+        "check out http://www.gromacs.org for more information."
+    };
+    static const char * const LicenseText[] = {
+        "GROMACS is free software; you can redistribute it and/or modify it",
+        "under the terms of the GNU Lesser General Public License",
+        "as published by the Free Software Foundation; either version 2.1",
+        "of the License, or (at your option) any later version."
+    };
+
+#define NCONTRIBUTORS (int)asize(Contributors)
+#define NCR (int)asize(CopyrightText)
+
+// FAH has an exception permission from LGPL to allow digital signatures in Gromacs.
+#ifdef GMX_FAHCORE
+#define NLICENSE 0
+#else
+#define NLICENSE (int)asize(LicenseText)
+#endif
+
+    printCentered(fp, 78, "GROMACS is written by:");
+    fprintf(fp, "\n");
+    for (int i = 0; i < NCONTRIBUTORS; )
+    {
+        for (int j = 0; j < 4 && i < NCONTRIBUTORS; ++j, ++i)
+        {
+            const int width = 18;
+            char      buf[30];
+            const int offset = centeringOffset(width, strlen(Contributors[i]));
+            GMX_RELEASE_ASSERT(strlen(Contributors[i]) + offset < asize(buf),
+                               "Formatting buffer is not long enough");
+            std::fill(buf, buf+width, ' ');
+            std::strcpy(buf+offset, Contributors[i]);
+            fprintf(fp, " %-*s", width, buf);
+        }
+        fprintf(fp, "\n");
+    }
+    printCentered(fp, 78, "and the project leaders:");
+    fprintf(fp, "\n");
+    printCentered(fp, 78, "Mark Abraham, Berk Hess, Erik Lindahl, and David van der Spoel");
+    fprintf(fp, "\n\n");
+    for (int i = 0; i < NCR; ++i)
+    {
+        fprintf(fp, "%s\n", CopyrightText[i]);
+    }
+    fprintf(fp, "\n");
+    for (int i = 0; i < NLICENSE; ++i)
+    {
+        fprintf(fp, "%s\n", LicenseText[i]);
+    }
+}
+
+// Construct a string that describes the library that provides FFT support to this build
+const char *getFftDescriptionString()
+{
+// Define the FFT description string
+#if GMX_FFT_FFTW3
+#  ifdef GMX_NATIVE_WINDOWS
+    // Don't buy trouble
+    return "fftw3";
+#  else
+    // Use the version string provided by libfftw3
+#    ifdef GMX_DOUBLE
+    return fftw_version;
+#    else
+    return fftwf_version;
+#    endif
+#  endif
+#endif
+#if GMX_FFT_MKL
+    return "Intel MKL";
+#endif
+#if GMX_FFT_FFTPACK
+    return "fftpack (built-in)";
+#endif
+};
+
+void gmx_print_version_info(FILE *fp)
+{
+    fprintf(fp, "GROMACS version:    %s\n", gmx_version());
+    const char *const git_hash = gmx_version_git_full_hash();
+    if (git_hash[0] != '\0')
+    {
+        fprintf(fp, "GIT SHA1 hash:      %s\n", git_hash);
+    }
+    const char *const base_hash = gmx_version_git_central_base_hash();
+    if (base_hash[0] != '\0')
+    {
+        fprintf(fp, "Branched from:      %s\n", base_hash);
+    }
+
+#ifdef GMX_DOUBLE
+    fprintf(fp, "Precision:          double\n");
+#else
+    fprintf(fp, "Precision:          single\n");
+#endif
+    fprintf(fp, "Memory model:       %u bit\n", (unsigned)(8*sizeof(void *)));
+
+#ifdef GMX_THREAD_MPI
+    fprintf(fp, "MPI library:        thread_mpi\n");
+#elif defined(GMX_MPI)
+    fprintf(fp, "MPI library:        MPI\n");
+#else
+    fprintf(fp, "MPI library:        none\n");
+#endif
+#ifdef GMX_OPENMP
+    fprintf(fp, "OpenMP support:     enabled (GMX_OPENMP_MAX_THREADS = %d)\n", GMX_OPENMP_MAX_THREADS);
+#else
+    fprintf(fp, "OpenMP support:     disabled\n");
+#endif
+    fprintf(fp, "GPU support:        %s\n", getGpuImplementationString());
+    /* A preprocessor trick to avoid duplicating logic from vec.h */
+#define gmx_stringify2(x) #x
+#define gmx_stringify(x) gmx_stringify2(x)
+    fprintf(fp, "invsqrt routine:    %s\n", gmx_stringify(gmx_invsqrt_impl(x)));
+    fprintf(fp, "SIMD instructions:  %s\n", GMX_SIMD_STRING);
+    fprintf(fp, "FFT library:        %s\n", getFftDescriptionString());
+#ifdef HAVE_RDTSCP
+    fprintf(fp, "RDTSCP usage:       enabled\n");
+#else
+    fprintf(fp, "RDTSCP usage:       disabled\n");
+#endif
+#ifdef GMX_USE_TNG
+    fprintf(fp, "TNG support:        enabled\n");
+#else
+    fprintf(fp, "TNG support:        disabled\n");
+#endif
+#if HAVE_EXTRAE
+    unsigned major, minor, revision;
+    Extrae_get_version(&major, &minor, &revision);
+    fprintf(fp, "Tracing support:    enabled. Using Extrae-%d.%d.%d\n", major, minor, revision);
+#else
+    fprintf(fp, "Tracing support:    disabled\n");
+#endif
+
+
+    fprintf(fp, "Built on:           %s\n", BUILD_TIME);
+    fprintf(fp, "Built by:           %s\n", BUILD_USER);
+    fprintf(fp, "Build OS/arch:      %s\n", BUILD_HOST);
+    fprintf(fp, "Build CPU vendor:   %s\n", BUILD_CPU_VENDOR);
+    fprintf(fp, "Build CPU brand:    %s\n", BUILD_CPU_BRAND);
+    fprintf(fp, "Build CPU family:   %d   Model: %d   Stepping: %d\n",
+            BUILD_CPU_FAMILY, BUILD_CPU_MODEL, BUILD_CPU_STEPPING);
+    /* TODO: The below strings can be quite long, so it would be nice to wrap
+     * them. Can wait for later, as the master branch has ready code to do all
+     * that. */
+    fprintf(fp, "Build CPU features: %s\n", BUILD_CPU_FEATURES);
+    fprintf(fp, "C compiler:         %s\n", BUILD_C_COMPILER);
+    fprintf(fp, "C compiler flags:   %s\n", BUILD_CFLAGS);
+    fprintf(fp, "C++ compiler:       %s\n", BUILD_CXX_COMPILER);
+    fprintf(fp, "C++ compiler flags: %s\n", BUILD_CXXFLAGS);
+#ifdef HAVE_LIBMKL
+    /* MKL might be used for LAPACK/BLAS even if FFTs use FFTW, so keep it separate */
+    fprintf(fp, "Linked with Intel MKL version %d.%d.%d.\n",
+            __INTEL_MKL__, __INTEL_MKL_MINOR__, __INTEL_MKL_UPDATE__);
+#endif
+#if GMX_GPU == GMX_GPU_OPENCL
+    fprintf(fp, "OpenCL include dir: %s\n", OPENCL_INCLUDE_DIR);
+    fprintf(fp, "OpenCL library:     %s\n", OPENCL_LIBRARY);
+    fprintf(fp, "OpenCL version:     %s\n", OPENCL_VERSION_STRING);
+#endif
+#if GMX_GPU == GMX_GPU_CUDA
+    gmx_print_version_info_cuda_gpu(fp);
+#endif
+}
+
+//! \endcond
+
+} // namespace
+
+namespace gmx
+{
+
+BinaryInformationSettings::BinaryInformationSettings()
+    : bExtendedInfo_(false), bCopyright_(false),
+      bGeneratedByHeader_(false), prefix_(""), suffix_("")
+{
+}
+
+void printBinaryInformation(FILE                  *fp,
+                            const IProgramContext &programContext)
+{
+    printBinaryInformation(fp, programContext, BinaryInformationSettings());
+}
+
+void printBinaryInformation(FILE                            *fp,
+                            const IProgramContext           &programContext,
+                            const BinaryInformationSettings &settings)
+{
+    const char *prefix          = settings.prefix_;
+    const char *suffix          = settings.suffix_;
+    const char *precisionString = "";
+#ifdef GMX_DOUBLE
+    precisionString = " (double precision)";
+#endif
+    const char *const name = programContext.displayName();
+    if (settings.bGeneratedByHeader_)
+    {
+        fprintf(fp, "%sCreated by:%s\n", prefix, suffix);
+    }
+    // TODO: It would be nice to know here whether we are really running a
+    // Gromacs binary or some other binary that is calling Gromacs; we
+    // could then print "%s is part of GROMACS" or some alternative text.
+    std::string title
+        = formatString(":-) GROMACS - %s, %s%s (-:", name, gmx_version(), precisionString);
+    const int   indent
+        = centeringOffset(78 - std::strlen(prefix) - std::strlen(suffix), title.length()) + 1;
+    fprintf(fp, "%s%*c%s%s\n", prefix, indent, ' ', title.c_str(), suffix);
+    fprintf(fp, "%s%s\n", prefix, suffix);
+    if (settings.bCopyright_)
+    {
+        GMX_RELEASE_ASSERT(prefix[0] == '\0' && suffix[0] == '\0',
+                           "Prefix/suffix not supported with copyright");
+        printCopyright(fp);
+        fprintf(fp, "\n");
+        // This line is printed again after the copyright notice to make it
+        // appear together with all the other information, so that it is not
+        // necessary to read stuff above the copyright notice.
+        // The line above the copyright notice puts the copyright notice is
+        // context, though.
+        fprintf(fp, "%sGROMACS:      %s, %s%s%s\n", prefix, name,
+                gmx_version(), precisionString, suffix);
+    }
+    const char *const binaryPath = programContext.fullBinaryPath();
+    if (!gmx::isNullOrEmpty(binaryPath))
+    {
+        fprintf(fp, "%sExecutable:   %s%s\n", prefix, binaryPath, suffix);
+    }
+    const gmx::InstallationPrefixInfo installPrefix = programContext.installationPrefix();
+    if (!gmx::isNullOrEmpty(installPrefix.path))
+    {
+        fprintf(fp, "%sData prefix:  %s%s%s\n", prefix, installPrefix.path,
+                installPrefix.bSourceLayout ? " (source tree)" : "", suffix);
+    }
+    const char *const commandLine = programContext.commandLine();
+    if (!gmx::isNullOrEmpty(commandLine))
+    {
+        fprintf(fp, "%sCommand line:%s\n%s  %s%s\n",
+                prefix, suffix, prefix, commandLine, suffix);
+    }
+    if (settings.bExtendedInfo_)
+    {
+        GMX_RELEASE_ASSERT(prefix[0] == '\0' && suffix[0] == '\0',
+                           "Prefix/suffix not supported with extended info");
+        fprintf(fp, "\n");
+        gmx_print_version_info(fp);
+    }
+}
+
+} // namespace gmx
similarity index 93%
rename from src/gromacs/fileio/copyrite.h
rename to src/gromacs/utility/binaryinformation.h
index a0f5142ddf7ba2170833f385acaa55762bc001e6..4611aa79538b018b7bce2418cbfdc82ee45343a1 100644 (file)
  * To help us fund GROMACS development, we humbly ask that you cite
  * the research papers on the package. Check out http://www.gromacs.org.
  */
-#ifndef GMX_FILEIO_COPYRITE_H
-#define GMX_FILEIO_COPYRITE_H
+/*! \libinternal \file
+ * \brief Helper functionality for information about the currently running binary
+ *
+ * \inlibraryapi
+ * \ingroup module_utility
+ */
+#ifndef GMX_UTILITY_BINARYINFORMATION_H
+#define GMX_UTILITY_BINARYINFORMATION_H
 
 #include <cstdio>
 
-void
-please_cite(FILE *fp, const char *key);
-/* Print a message asking to cite something... */
-
 namespace gmx
 {
 
 class IProgramContext;
 
-/*! \libinternal\brief
+/*! \libinternal \brief
  * Settings for printBinaryInformation().
  *
  * This class is used to specify what printBinaryInformation() prints.
+ *
+ * \ingroup module_utility
+ * \inlibraryapi
  */
 class BinaryInformationSettings
 {
similarity index 97%
rename from src/gromacs/gmxlib/cuda_tools/copyrite_gpu.cu
rename to src/gromacs/utility/cuda_version_information.cu
index 6e3bc17e87bb6bea8d1acc2cf15998a3aedad060..98ce1cc2ccf7fc4e0b20f5d2e53f535e50024436 100644 (file)
@@ -35,7 +35,9 @@
 
 #include "gmxpre.h"
 
-#include <stdio.h>
+#include "cuda_version_information.h"
+
+#include <cstdio>
 
 #include "buildinfo.h"
 
diff --git a/src/gromacs/utility/cuda_version_information.h b/src/gromacs/utility/cuda_version_information.h
new file mode 100644 (file)
index 0000000..edff41c
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 2015, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+#ifndef GMX_GMXLIB_CUDA_TOOLS_CUDA_VERSION_INFORMATION_H
+#define GMX_GMXLIB_CUDA_TOOLS_CUDA_VERSION_INFORMATION_H
+
+#include <cstdio>
+
+void gmx_print_version_info_cuda_gpu(FILE *fp);
+
+#endif
similarity index 62%
rename from src/gromacs/fileio/copyrite.cpp
rename to src/gromacs/utility/pleasecite.cpp
index 5a354dc1ae88b379ed0cc6659b1080226268fdff..f472f2d15b599e25f86fcb67760e0ebe83307b0a 100644 (file)
  */
 #include "gmxpre.h"
 
-#include "copyrite.h"
+#include "pleasecite.h"
 
-#include "config.h"
-
-#include <cstdio>
 #include <cstring>
 
-#include <algorithm>
-
-#if GMX_FFT_FFTW3
-// Needed for construction of the FFT library description string
-#include <fftw3.h>
-#endif
-
-#ifdef HAVE_LIBMKL
-#include <mkl.h>
-#endif
-
-#if HAVE_EXTRAE
-#include <extrae_user_events.h>
-#endif
-
-/* This file is completely threadsafe - keep it that way! */
-
-#include "buildinfo.h"
-#include "gromacs/math/vec.h"
 #include "gromacs/utility/arraysize.h"
-#include "gromacs/utility/baseversion.h"
 #include "gromacs/utility/cstringutil.h"
-#include "gromacs/utility/gmxassert.h"
-#include "gromacs/utility/programcontext.h"
 #include "gromacs/utility/smalloc.h"
-#include "gromacs/utility/stringutil.h"
-
-static int centeringOffset(int width, int length)
-{
-    return std::max(width - length, 0) / 2;
-}
-
-static void printCentered(FILE *fp, int width, const char *text)
-{
-    const int offset = centeringOffset(width, std::strlen(text));
-    fprintf(fp, "%*s%s", offset, "", text);
-}
-
-static void printCopyright(FILE *fp)
-{
-    static const char * const Contributors[] = {
-        "Emile Apol",
-        "Rossen Apostolov",
-        "Herman J.C. Berendsen",
-        "Par Bjelkmar",
-        "Aldert van Buuren",
-        "Rudi van Drunen",
-        "Anton Feenstra",
-        "Gerrit Groenhof",
-        "Christoph Junghans",
-        "Anca Hamuraru",
-        "Vincent Hindriksen",
-        "Dimitrios Karkoulis",
-        "Peter Kasson",
-        "Jiri Kraus",
-        "Carsten Kutzner",
-        "Per Larsson",
-        "Justin A. Lemkul",
-        "Magnus Lundborg",
-        "Pieter Meulenhoff",
-        "Erik Marklund",
-        "Teemu Murtola",
-        "Szilard Pall",
-        "Sander Pronk",
-        "Roland Schulz",
-        "Alexey Shvetsov",
-        "Michael Shirts",
-        "Alfons Sijbers",
-        "Peter Tieleman",
-        "Teemu Virolainen",
-        "Christian Wennberg",
-        "Maarten Wolf"
-    };
-    static const char * const CopyrightText[] = {
-        "Copyright (c) 1991-2000, University of Groningen, The Netherlands.",
-        "Copyright (c) 2001-2015, The GROMACS development team at",
-        "Uppsala University, Stockholm University and",
-        "the Royal Institute of Technology, Sweden.",
-        "check out http://www.gromacs.org for more information."
-    };
-    static const char * const LicenseText[] = {
-        "GROMACS is free software; you can redistribute it and/or modify it",
-        "under the terms of the GNU Lesser General Public License",
-        "as published by the Free Software Foundation; either version 2.1",
-        "of the License, or (at your option) any later version."
-    };
-
-#define NCONTRIBUTORS (int)asize(Contributors)
-#define NCR (int)asize(CopyrightText)
-
-// FAH has an exception permission from LGPL to allow digital signatures in Gromacs.
-#ifdef GMX_FAHCORE
-#define NLICENSE 0
-#else
-#define NLICENSE (int)asize(LicenseText)
-#endif
-
-    printCentered(fp, 78, "GROMACS is written by:");
-    fprintf(fp, "\n");
-    for (int i = 0; i < NCONTRIBUTORS; )
-    {
-        for (int j = 0; j < 4 && i < NCONTRIBUTORS; ++j, ++i)
-        {
-            const int width = 18;
-            char      buf[30];
-            const int offset = centeringOffset(width, strlen(Contributors[i]));
-            GMX_RELEASE_ASSERT(strlen(Contributors[i]) + offset < asize(buf),
-                               "Formatting buffer is not long enough");
-            std::fill(buf, buf+width, ' ');
-            std::strcpy(buf+offset, Contributors[i]);
-            fprintf(fp, " %-*s", width, buf);
-        }
-        fprintf(fp, "\n");
-    }
-    printCentered(fp, 78, "and the project leaders:");
-    fprintf(fp, "\n");
-    printCentered(fp, 78, "Mark Abraham, Berk Hess, Erik Lindahl, and David van der Spoel");
-    fprintf(fp, "\n\n");
-    for (int i = 0; i < NCR; ++i)
-    {
-        fprintf(fp, "%s\n", CopyrightText[i]);
-    }
-    fprintf(fp, "\n");
-    for (int i = 0; i < NLICENSE; ++i)
-    {
-        fprintf(fp, "%s\n", LicenseText[i]);
-    }
-}
-
 
 typedef struct {
     const char *key;
@@ -533,200 +404,3 @@ void please_cite(FILE *fp, const char *key)
     fprintf(fp, "-------- -------- --- Thank You --- -------- --------\n\n");
     fflush(fp);
 }
-
-extern void gmx_print_version_info_cuda_gpu(FILE *fp);
-
-// Construct a string that describes the library that provides FFT support to this build
-static const char *getFftDescriptionString()
-{
-// Define the FFT description string
-#if GMX_FFT_FFTW3
-#  ifdef GMX_NATIVE_WINDOWS
-    // Don't buy trouble
-    return "fftw3";
-#  else
-    // Use the version string provided by libfftw3
-#    ifdef GMX_DOUBLE
-    return fftw_version;
-#    else
-    return fftwf_version;
-#    endif
-#  endif
-#endif
-#if GMX_FFT_MKL
-    return "Intel MKL";
-#endif
-#if GMX_FFT_FFTPACK
-    return "fftpack (built-in)";
-#endif
-};
-
-static void gmx_print_version_info(FILE *fp)
-{
-    fprintf(fp, "GROMACS version:    %s\n", gmx_version());
-    const char *const git_hash = gmx_version_git_full_hash();
-    if (git_hash[0] != '\0')
-    {
-        fprintf(fp, "GIT SHA1 hash:      %s\n", git_hash);
-    }
-    const char *const base_hash = gmx_version_git_central_base_hash();
-    if (base_hash[0] != '\0')
-    {
-        fprintf(fp, "Branched from:      %s\n", base_hash);
-    }
-
-#ifdef GMX_DOUBLE
-    fprintf(fp, "Precision:          double\n");
-#else
-    fprintf(fp, "Precision:          single\n");
-#endif
-    fprintf(fp, "Memory model:       %u bit\n", (unsigned)(8*sizeof(void *)));
-
-#ifdef GMX_THREAD_MPI
-    fprintf(fp, "MPI library:        thread_mpi\n");
-#elif defined(GMX_MPI)
-    fprintf(fp, "MPI library:        MPI\n");
-#else
-    fprintf(fp, "MPI library:        none\n");
-#endif
-#ifdef GMX_OPENMP
-    fprintf(fp, "OpenMP support:     enabled (GMX_OPENMP_MAX_THREADS = %d)\n", GMX_OPENMP_MAX_THREADS);
-#else
-    fprintf(fp, "OpenMP support:     disabled\n");
-#endif
-    fprintf(fp, "GPU support:        %s\n", getGpuImplementationString());
-    /* A preprocessor trick to avoid duplicating logic from vec.h */
-#define gmx_stringify2(x) #x
-#define gmx_stringify(x) gmx_stringify2(x)
-    fprintf(fp, "invsqrt routine:    %s\n", gmx_stringify(gmx_invsqrt_impl(x)));
-    fprintf(fp, "SIMD instructions:  %s\n", GMX_SIMD_STRING);
-    fprintf(fp, "FFT library:        %s\n", getFftDescriptionString());
-#ifdef HAVE_RDTSCP
-    fprintf(fp, "RDTSCP usage:       enabled\n");
-#else
-    fprintf(fp, "RDTSCP usage:       disabled\n");
-#endif
-#ifdef GMX_USE_TNG
-    fprintf(fp, "TNG support:        enabled\n");
-#else
-    fprintf(fp, "TNG support:        disabled\n");
-#endif
-#if HAVE_EXTRAE
-    unsigned major, minor, revision;
-    Extrae_get_version(&major, &minor, &revision);
-    fprintf(fp, "Tracing support:    enabled. Using Extrae-%d.%d.%d\n", major, minor, revision);
-#else
-    fprintf(fp, "Tracing support:    disabled\n");
-#endif
-
-
-    fprintf(fp, "Built on:           %s\n", BUILD_TIME);
-    fprintf(fp, "Built by:           %s\n", BUILD_USER);
-    fprintf(fp, "Build OS/arch:      %s\n", BUILD_HOST);
-    fprintf(fp, "Build CPU vendor:   %s\n", BUILD_CPU_VENDOR);
-    fprintf(fp, "Build CPU brand:    %s\n", BUILD_CPU_BRAND);
-    fprintf(fp, "Build CPU family:   %d   Model: %d   Stepping: %d\n",
-            BUILD_CPU_FAMILY, BUILD_CPU_MODEL, BUILD_CPU_STEPPING);
-    /* TODO: The below strings can be quite long, so it would be nice to wrap
-     * them. Can wait for later, as the master branch has ready code to do all
-     * that. */
-    fprintf(fp, "Build CPU features: %s\n", BUILD_CPU_FEATURES);
-    fprintf(fp, "C compiler:         %s\n", BUILD_C_COMPILER);
-    fprintf(fp, "C compiler flags:   %s\n", BUILD_CFLAGS);
-    fprintf(fp, "C++ compiler:       %s\n", BUILD_CXX_COMPILER);
-    fprintf(fp, "C++ compiler flags: %s\n", BUILD_CXXFLAGS);
-#ifdef HAVE_LIBMKL
-    /* MKL might be used for LAPACK/BLAS even if FFTs use FFTW, so keep it separate */
-    fprintf(fp, "Linked with Intel MKL version %d.%d.%d.\n",
-            __INTEL_MKL__, __INTEL_MKL_MINOR__, __INTEL_MKL_UPDATE__);
-#endif
-#if GMX_GPU == GMX_GPU_OPENCL
-    fprintf(fp, "OpenCL include dir: %s\n", OPENCL_INCLUDE_DIR);
-    fprintf(fp, "OpenCL library:     %s\n", OPENCL_LIBRARY);
-    fprintf(fp, "OpenCL version:     %s\n", OPENCL_VERSION_STRING);
-#endif
-#if GMX_GPU == GMX_GPU_CUDA
-    gmx_print_version_info_cuda_gpu(fp);
-#endif
-}
-
-namespace gmx
-{
-
-BinaryInformationSettings::BinaryInformationSettings()
-    : bExtendedInfo_(false), bCopyright_(false),
-      bGeneratedByHeader_(false), prefix_(""), suffix_("")
-{
-}
-
-void printBinaryInformation(FILE                  *fp,
-                            const IProgramContext &programContext)
-{
-    printBinaryInformation(fp, programContext, BinaryInformationSettings());
-}
-
-void printBinaryInformation(FILE                            *fp,
-                            const IProgramContext           &programContext,
-                            const BinaryInformationSettings &settings)
-{
-    const char *prefix          = settings.prefix_;
-    const char *suffix          = settings.suffix_;
-    const char *precisionString = "";
-#ifdef GMX_DOUBLE
-    precisionString = " (double precision)";
-#endif
-    const char *const name = programContext.displayName();
-    if (settings.bGeneratedByHeader_)
-    {
-        fprintf(fp, "%sCreated by:%s\n", prefix, suffix);
-    }
-    // TODO: It would be nice to know here whether we are really running a
-    // Gromacs binary or some other binary that is calling Gromacs; we
-    // could then print "%s is part of GROMACS" or some alternative text.
-    std::string title
-        = formatString(":-) GROMACS - %s, %s%s (-:", name, gmx_version(), precisionString);
-    const int   indent
-        = centeringOffset(78 - std::strlen(prefix) - std::strlen(suffix), title.length()) + 1;
-    fprintf(fp, "%s%*c%s%s\n", prefix, indent, ' ', title.c_str(), suffix);
-    fprintf(fp, "%s%s\n", prefix, suffix);
-    if (settings.bCopyright_)
-    {
-        GMX_RELEASE_ASSERT(prefix[0] == '\0' && suffix[0] == '\0',
-                           "Prefix/suffix not supported with copyright");
-        printCopyright(fp);
-        fprintf(fp, "\n");
-        // This line is printed again after the copyright notice to make it
-        // appear together with all the other information, so that it is not
-        // necessary to read stuff above the copyright notice.
-        // The line above the copyright notice puts the copyright notice is
-        // context, though.
-        fprintf(fp, "%sGROMACS:      %s, %s%s%s\n", prefix, name,
-                gmx_version(), precisionString, suffix);
-    }
-    const char *const binaryPath = programContext.fullBinaryPath();
-    if (!gmx::isNullOrEmpty(binaryPath))
-    {
-        fprintf(fp, "%sExecutable:   %s%s\n", prefix, binaryPath, suffix);
-    }
-    const gmx::InstallationPrefixInfo installPrefix = programContext.installationPrefix();
-    if (!gmx::isNullOrEmpty(installPrefix.path))
-    {
-        fprintf(fp, "%sData prefix:  %s%s%s\n", prefix, installPrefix.path,
-                installPrefix.bSourceLayout ? " (source tree)" : "", suffix);
-    }
-    const char *const commandLine = programContext.commandLine();
-    if (!gmx::isNullOrEmpty(commandLine))
-    {
-        fprintf(fp, "%sCommand line:%s\n%s  %s%s\n",
-                prefix, suffix, prefix, commandLine, suffix);
-    }
-    if (settings.bExtendedInfo_)
-    {
-        GMX_RELEASE_ASSERT(prefix[0] == '\0' && suffix[0] == '\0',
-                           "Prefix/suffix not supported with extended info");
-        fprintf(fp, "\n");
-        gmx_print_version_info(fp);
-    }
-}
-
-} // namespace gmx
diff --git a/src/gromacs/utility/pleasecite.h b/src/gromacs/utility/pleasecite.h
new file mode 100644 (file)
index 0000000..1ae9e7f
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
+ * Copyright (c) 2001-2004, The GROMACS development team.
+ * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+ *
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*! \libinternal \file
+ * \brief
+ * Declares please_cite() for printing out literature references.
+ *
+ * \inlibraryapi
+ * \ingroup module_utility
+ */
+#ifndef GMX_UTILITY_PLEASECITE_H
+#define GMX_UTILITY_PLEASECITE_H
+
+#include <cstdio>
+
+//! Print a message asking to cite something
+void
+please_cite(FILE *fp, const char *key);
+
+#endif
index 52bf03f49298509c25b4ea336164dfc8596b0e77..05867f110ea0fc3433746b8648b8b9a4f8ef81d9 100644 (file)
@@ -44,7 +44,6 @@
 #include <math.h>
 
 #include "gromacs/domdec/domdec.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/gmxlib/main.h"
 #include "gromacs/gmxlib/network.h"
 #include "gromacs/math/units.h"
@@ -53,6 +52,7 @@
 #include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/random/random.h"
 #include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 
 #define PROBABILITYCUTOFF 100
index 40126d88473fa45c0291bbf3175dd0c31291122f..025b57da1e9d474e6d9ff4ba7efbdb2243ba1553 100644 (file)
@@ -60,7 +60,6 @@
 #include "gromacs/essentialdynamics/edsam.h"
 #include "gromacs/ewald/pme.h"
 #include "gromacs/fileio/checkpoint.h"
-#include "gromacs/fileio/copyrite.h"
 #include "gromacs/fileio/oenv.h"
 #include "gromacs/fileio/tpxio.h"
 #include "gromacs/fileio/trx.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/gmxassert.h"
 #include "gromacs/utility/gmxmpi.h"
+#include "gromacs/utility/pleasecite.h"
 #include "gromacs/utility/smalloc.h"
 
 #include "deform.h"