echo"## specify the partition for the resource allocation. if not specified, slurm is allowed to take the default(the one with a star *)" >> launcher.sh;\
echo"## to specify the file of utput and error" >> launcher.sh;\
echo"#SBATCH --output $(OUTPUT)" >> launcher.sh;\
echo"#SBATCH --error $(ERROR)" >> launcher.sh;\
echo"" >> launcher.sh;\
echo"mpirun $(NAME)$(ARGS)" >> launcher.sh;\
chmod +x launcher.sh;\
echo"The 'launcher.sh' script has been created and is ready to run.";\
# else \
# chmod +x launcher.sh; \
# fi
@echo; sbatch launcher.sh
@echo " To see job list you can use 'squeue'."
@echo " To cancel a job you can use 'scancel jobid'."
detail:
@echo "Compiler flags and options that mpicxx would use for compiling an MPI program: "
@mpicxx --showme:compile
@echo
@echo "Linker flags and options that mpicxx would use for linking an MPI program: "
@mpicxx --showme:link
clean:
## Sembra non funzionare read
# read -p "rm: remove all files \"./$(JOBNAME).*.out\" and \"./e$(JOBNAME).*.err\"? (y/n)" choice
# @if [ "$$choice" = "y" ]; then \
@echo rm -f ./$(JOBNAME).*.out
@for file in ./$(JOBNAME).*.out;do\
rm -f "$$file";\
done
@echo rm -f ./e$(JOBNAME).*.err
@for file in ./e$(JOBNAME).*.err;do\
rm -f "$$file";\
done
# fi
rm -f *~ $(OBJ)
fclean:clean
rm -f ./launcher.sh;
rm -f ./nohup.out
rm -f /mnt/raid/tmp/SortedRun*
rm -f /mnt/raid/tmp/*.sort
rm -f $(NAME)
re:fcleanall
# mpicxx *.c
# mpirun/mpiexec ... //will run X copies of the program in the current run-time environment, scheduling(by default) in a round-robin fashion by CPU slot.