Commit f354993e authored by David Goz's avatar David Goz 😴
Browse files

pleaidi sbatch omp added

parent d467fe8e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -63,3 +63,4 @@ clean:
	rm -f cachegrind.out.*
	rm -f callgrind.*
	rm -f *bin
	rm -f jacobi_*
+6 −6
Original line number Diff line number Diff line
CC     ?= gcc
CFLAGS ?= -Wall -Wextra -march=native
OMP    ?= -fopenmp
LIBS   ?= -lm
CC     = gcc
CFLAGS = -Wall -Wextra -march=native
OMP    = -fopenmp
LIBS   = -lm

SYSTYPE = $(strip $(shell uname -n))

PROG           ?= jacobi_serial_not_opt_$(SYSTYPE)
PROG_OMP       ?= jacobi_omp_not_opt_$(SYSTYPE)
PROG            = jacobi_serial_not_opt_$(SYSTYPE)
PROG_OMP        = jacobi_omp_not_opt_$(SYSTYPE)
PROG_DEBUG      = $(PROG_OMP)_DEBUG
PROG_MEMCHECK   = $(PROG_OMP)_MEMCHECK
PROG_CALLGRIND  = $(PROG_OMP)_CALLGRIND
+9 −0
Original line number Diff line number Diff line
##########################################################################

# set the grid size

GRID_SIZE_X=128
GRID_SIZE_Y=128

OMP_THREADS=(1 2 4 8)
##########################################################################
+53 −0
Original line number Diff line number Diff line
#!/bin/bash

######################### RESOURSE ALLOCATION #####################################
##SBATCH --account=????????

#SBATCH --partition=pleiadi
#SBATCH --job-name="Jacobi"
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=8
#SBATCH --output=Jacobi-omp-no-opt-%j.out
#SBATCH --error=Jacobi-omp-no-opt.%j.err
#SBATCH --time=00:03:00
###################################################################################

################################## MODULES ########################################
export MODULE_VERSION=5.0.1
source /opt/cluster/spack/share/spack/setup-env.sh

# module purge
module purge
# load GCC
module load default-gcc-11.2.0
###################################################################################

# input parameters
source input_parameters

WORKDIR=${PWD}
# compile the application
cd .. && make clean && make omp
if [[ "$?" != "0" ]]
then
    echo "Cannot compile the application ...aborting..."
    exit 1
fi

# get the executable
EXEC=$(find $(realpath ./) -maxdepth 1 -executable -name "jacobi_*" -type f -print)
if [[ "$?" != "0" ]]
then
    echo "Cannot find the executable ...aborting..."
    exit 2
fi

for OMP in ${OMP_THREADS[@]}
do
    # run the application
    time ${EXEC} ${GRID_SIZE_X} ${GRID_SIZE_Y} ${OMP} |& tee ${EXEC}_OMP_${OMP}_output.txt
done
cd ${WORKDIR}

exit 0
+1 −0
Original line number Diff line number Diff line
@@ -63,3 +63,4 @@ clean:
	rm -f cachegrind.out.*
	rm -f callgrind.*
	rm -f *bin
	rm -f jacobi_*
Loading