From 33dfce497f2dcdcf071f6f83d88756b0f6bd99df Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 27 Jun 2018 17:18:50 +0200 Subject: Remove worker process numbers from temporary filenames Since we've had the separate worker folders for a long time, it's not needed any more. Removing them will make the temporary folders easier to clean up. --- libcrystfel/src/dirax.c | 4 ++-- libcrystfel/src/felix.c | 10 +++++----- libcrystfel/src/mosflm.c | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libcrystfel/src/dirax.c b/libcrystfel/src/dirax.c index 0f5b5741..53090c7c 100644 --- a/libcrystfel/src/dirax.c +++ b/libcrystfel/src/dirax.c @@ -277,7 +277,7 @@ static void dirax_send_next(struct image *image, struct dirax_data *dirax) break; case 2 : - snprintf(tmp, 31, "read xfel-%i.drx\n", image->id); + snprintf(tmp, 31, "read xfel.drx\n"); dirax_sendline(tmp, dirax); break; @@ -476,7 +476,7 @@ static void write_drx(struct image *image) int i; char filename[1024]; - snprintf(filename, 1023, "xfel-%i.drx", image->id); + snprintf(filename, 1023, "xfel.drx"); fh = fopen(filename, "w"); if ( !fh ) { diff --git a/libcrystfel/src/felix.c b/libcrystfel/src/felix.c index c7ff2d01..e686c2e6 100644 --- a/libcrystfel/src/felix.c +++ b/libcrystfel/src/felix.c @@ -328,7 +328,7 @@ static void write_gve(struct image *image, struct felix_private *gp) int i; char filename[1024]; double a, b, c, al, be, ga; - snprintf(filename, 1023, "xfel-%i.gve", image->id); + snprintf(filename, 1023, "xfel.gve"); fh = fopen(filename, "w"); if ( !fh ) { ERROR("Couldn't open temporary file '%s'\n", filename); @@ -371,9 +371,9 @@ static char *write_ini(struct image *image, struct felix_private *gp) filename = malloc(1024); if ( filename == NULL ) return NULL; - snprintf(filename, 1023, "xfel-%i.ini", image->id); - snprintf(gveFilename, 1023, "xfel-%i.gve", image->id); - snprintf(logFilename, 1023, "xfel-%i.log", image->id); + snprintf(filename, 1023, "xfel.ini"); + snprintf(gveFilename, 1023, "xfel.gve"); + snprintf(logFilename, 1023, "xfel.log"); fh = fopen(filename, "w"); if ( !fh ) { @@ -457,7 +457,7 @@ int felix_index(struct image *image, IndexingPrivate *ipriv) felix->gp = gp; - snprintf(gff_filename, 1023, "xfel-%i.felix", image->id); + snprintf(gff_filename, 1023, "xfel.felix"); remove(gff_filename); felix->pid = forkpty(&felix->pty, NULL, NULL, NULL); diff --git a/libcrystfel/src/mosflm.c b/libcrystfel/src/mosflm.c index 7b0159ab..36eeb35d 100644 --- a/libcrystfel/src/mosflm.c +++ b/libcrystfel/src/mosflm.c @@ -724,13 +724,13 @@ int run_mosflm(struct image *image, void *ipriv) return 0; } - snprintf(mosflm->imagefile, 127, "xfel-%i_001.img", image->id); + snprintf(mosflm->imagefile, 127, "xfel_001.img"); write_img(image, mosflm->imagefile); /* Dummy image */ - snprintf(mosflm->sptfile, 127, "xfel-%i_001.spt", image->id); + snprintf(mosflm->sptfile, 127, "xfel_001.spt"); write_spt(image, mosflm->sptfile); - snprintf(mosflm->newmatfile, 127, "xfel-%i.newmat", image->id); + snprintf(mosflm->newmatfile, 127, "xfel.newmat"); remove(mosflm->newmatfile); mosflm->pid = forkpty(&mosflm->pty, NULL, NULL, NULL); -- cgit v1.2.3