/*!\file:  WriteLockFile.cpp
 * \brief
 */ 
#include <stdio.h>
#include "../shared/shared.h"
#include "../include/include.h"

void WriteLockFile(char* filename){

	int i;
	extern int my_rank;
	
	/* output: */
	FILE* fid=NULL;

	/* Open lock file and write 1 into it: */
	if(my_rank==0){
		fid=fopen(filename,"w");
		if(fid==NULL) _error2_("error message: could not open lock file " << filename);

		/*Close file: */
		if(fclose(fid)!=0) _error2_("could not close lock file " << filename);
	}

}	
