diff options
-rw-r--r-- | README | 4 | ||||
-rw-r--r-- | src/announce.cc | 55 | ||||
-rw-r--r-- | src/make.configuration.deps | 34 | ||||
-rw-r--r-- | src/multistorage.cc | 3 |
4 files changed, 84 insertions, 12 deletions
@@ -49,6 +49,10 @@ update the source tarballs not only when the thorn library changes, but also when a *.ccl or make.* file changes. do not necessarily update them all when the bindings change. +fork (or spawn a thread) before announcing, so that the simulation +does not have to wait + make sure to kill the old spawn before a new is created + RSS: add RSS feed diff --git a/src/announce.cc b/src/announce.cc index 5d40096..cf156de 100644 --- a/src/announce.cc +++ b/src/announce.cc @@ -92,13 +92,13 @@ namespace Formaline time_t const tim = time (0); struct tm * const ptm = gmtime (& tim); job_idbuf << setfill ('0') - << setw(4) << ptm->tm_year - << setw(2) << ptm->tm_mon - << setw(2) << ptm->tm_mday - << "-" - << setw(2) << ptm->tm_hour - << setw(2) << ptm->tm_min - << setw(2) << ptm->tm_sec; + << setw(4) << ptm->tm_year + << setw(2) << ptm->tm_mon + << setw(2) << ptm->tm_mday + << "-" + << setw(2) << ptm->tm_hour + << setw(2) << ptm->tm_min + << setw(2) << ptm->tm_sec; job_idbuf << "-"; @@ -178,6 +178,7 @@ namespace Formaline // Don't know what this is for stores.store ("jobtype", "default"); } + { int type; void const * const ptr @@ -186,6 +187,7 @@ namespace Formaline char const * const run_title = * static_cast<char const * const *> (ptr); stores.store ("app_title", run_title); } + { char run_date [1000]; Util_CurrentDate (sizeof run_date, run_date); @@ -196,18 +198,22 @@ namespace Formaline string const timestr = timebuf.str(); stores.store ("start_time", timestr.c_str()); } + { // Don't know what this is for stores.store ("project_name", ""); } + { stores.store ("output_files", out_dir); } + { char run_host [1000]; Util_GetHostName (run_host, sizeof run_host); stores.store ("host", run_host); } + { unsigned long http_port; #ifdef __HTTP_CONTENT_H__ @@ -227,11 +233,16 @@ namespace Formaline http_port = 0; } #endif - stores.store ("port", (int) http_port); + if (http_port != 0) + { + stores.store ("port", (int) http_port); + } } + { stores.store ("portal_username", portal_username); } + { #if 0 char const * const run_user = CCTK_RunUser(); @@ -240,11 +251,13 @@ namespace Formaline #endif stores.store ("local_username", run_user); } + { char parameter_filename [10000]; CCTK_ParameterFilename (sizeof parameter_filename, parameter_filename); stores.store ("parameter_file", parameter_filename); } + { char ** argv; int argc; @@ -252,23 +265,49 @@ namespace Formaline for (argc = 0; argv [argc]; ++ argc); stores.store ("executable", argc == 0 ? "" : argv[0]); } + { // Don't know what this is for stores.store ("data_directory", ""); } + { // Could also be "private" stores.store ("app_visibility", "public"); } + { // Could apparently be none, register, update, deregister stores.store ("notification_reports", ""); } + { // Could apparently be none, email, im, sms stores.store ("notification_methods", ""); } + + + // PBS + + { + // PBS logname + char const * const pbs_logname = getenv ("PBS_LOGNAME"); + stores.store ("PBS logname", pbs_logname); + } + + { + // PBS host + char const * const pbs_host = getenv ("PBS_HOST"); + stores.store ("PBS host", pbs_host); + } + + { + // PBS workdir + char const * const pbs_workdir = getenv ("PBS_WORKDIR"); + stores.store ("PBS workdir", pbs_workdir); + } + // Cactus diff --git a/src/make.configuration.deps b/src/make.configuration.deps index 4dd8b74..271084b 100644 --- a/src/make.configuration.deps +++ b/src/make.configuration.deps @@ -56,7 +56,9 @@ $(TARBALL_DIR)/cactus-meta-source.c: $(TARBALL_DIR)/cactus-flesh-source.c $(pats +############################################################################### # Flesh +############################################################################### $(TARBALL_DIR)/cactus-flesh-source.o: $(TARBALL_DIR)/cactus-flesh-source.c @echo "Creating tarball for the flesh" @@ -72,8 +74,7 @@ $(TARBALL_DIR)/cactus-flesh-source.tar.gz: $(TARBALL_DIR)/cactus-flesh-source.fi # This dependency means that the tarball for a thorn is only updated # if the thorn is actually recompiled. This does not catch changes to # files that do not influence the executable. -# Update the tarball also when the CST stage is rerun. -$(TARBALL_DIR)/cactus-flesh-source.files: $(CCTK_LIBDIR)/$(LIBNAME_PREFIX)$(CCTK_LIBNAME_PREFIX)$(FLESHLIB)$(LIBNAME_SUFFIX) $(CCTK_LIBDIR)/$(LIBNAME_PREFIX)$(CCTK_LIBNAME_PREFIX)$(BINDINGSLIB)$(LIBNAME_SUFFIX) +$(TARBALL_DIR)/cactus-flesh-source.files: $(CCTK_LIBDIR)/$(LIBNAME_PREFIX)$(CCTK_LIBNAME_PREFIX)$(FLESHLIB)$(LIBNAME_SUFFIX) $(TARBALL_DIR)/cactus-flesh-source.ccldeps cd $(CCTK_HOME) && \ find CONTRIBUTORS COPYRIGHT Makefile lib src \ configs/$(notdir $(TOP))/config-info \ @@ -83,9 +84,23 @@ $(TARBALL_DIR)/cactus-flesh-source.files: $(CCTK_LIBDIR)/$(LIBNAME_PREFIX)$(CCTK -not -type d \ -print > $@ +-include $(TARBALL_DIR)/cactus-flesh-source.ccldeps +# Make aborts if these dependencies vanish. There mention only files +# here that cannot go away. +$(TARBALL_DIR)/cactus-flesh-source.ccldeps: + { \ + echo "$(@:%.ccldeps=%.files) \\"; \ + echo "$@: \\"; \ + echo " $(CCTK_HOME)/src/interface.ccl \\"; \ + echo " $(CCTK_HOME)/src/param.ccl \\"; \ + echo " $(CCTK_HOME)/src/schedule.ccl"; \ + } > $@ + +############################################################################### # Thorns +############################################################################### $(TARBALL_DIR)/cactus-thorn-source-%.o: $(TARBALL_DIR)/cactus-thorn-source-%.c @echo "Creating tarball for thorn $(@:$(TARBALL_DIR)/cactus-thorn-source-%.o=%)" @@ -101,8 +116,7 @@ $(TARBALL_DIR)/cactus-thorn-source-%.tar.gz: $(TARBALL_DIR)/cactus-thorn-source- # This dependency means that the tarball for a thorn is only updated # if the thorn is actually recompiled. This does not catch changes to # files that do not influence the executable. -# Update the tarball also when the CST stage is rerun. -$(TARBALL_DIR)/cactus-thorn-source-%.files: $(CCTK_LIBDIR)/$(LIBNAME_PREFIX)$(CCTK_LIBNAME_PREFIX)%$(LIBNAME_SUFFIX) $(CCTK_LIBDIR)/$(LIBNAME_PREFIX)$(CCTK_LIBNAME_PREFIX)$(BINDINGSLIB)$(LIBNAME_SUFFIX) +$(TARBALL_DIR)/cactus-thorn-source-%.files: $(CCTK_LIBDIR)/$(LIBNAME_PREFIX)$(CCTK_LIBNAME_PREFIX)%$(LIBNAME_SUFFIX) $(TARBALL_DIR)/cactus-thorn-source-%.ccldeps cd $(CCTK_HOME) && \ find arrangements/$(filter %/$(@:$(TARBALL_DIR)/cactus-thorn-source-%.files=%),$(THORNS)) \ -path 'arrangements/*/*/doc' -prune -o \ @@ -112,3 +126,15 @@ $(TARBALL_DIR)/cactus-thorn-source-%.files: $(CCTK_LIBDIR)/$(LIBNAME_PREFIX)$(CC -name '*~' -prune -o \ -not -type d \ -print > $@ + +-include $(patsubst %,$(TARBALL_DIR)/cactus-thorn-source-%.ccldeps,$(notdir $(THORNS))) +# Make aborts if these dependencies vanish. There mention only files +# here that cannot go away. +$(TARBALL_DIR)/cactus-thorn-source-%.ccldeps: + { \ + echo "$(@:%.ccldeps=%.files) \\"; \ + echo "$@: \\"; \ + echo " $(CCTK_HOME)/arrangements/$(filter %/$(@:$(TARBALL_DIR)/cactus-thorn-source-%.ccldeps=%),$(THORNS))/interface.ccl \\"; \ + echo " $(CCTK_HOME)/arrangements/$(filter %/$(@:$(TARBALL_DIR)/cactus-thorn-source-%.ccldeps=%),$(THORNS))/param.ccl \\"; \ + echo " $(CCTK_HOME)/arrangements/$(filter %/$(@:$(TARBALL_DIR)/cactus-thorn-source-%.ccldeps=%),$(THORNS))/schedule.ccl"; \ + } > $@ diff --git a/src/multistorage.cc b/src/multistorage.cc index 6b16c75..96bbcc7 100644 --- a/src/multistorage.cc +++ b/src/multistorage.cc @@ -94,6 +94,9 @@ namespace Formaline store (char const * const key, char const * const value) const { + // Ignore null strings + if (value == 0) return; + for (list<storage *>::const_iterator it = stores.begin(); it != stores.end(); ++ it) |