This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download and Install the Latest Updates for the OS | |
apt-get update && apt-get upgrade -y | |
# Set the Server Timezone to CST | |
echo "America/Chicago" > /etc/timezone | |
dpkg-reconfigure -f noninteractive tzdata | |
# Enable Ubuntu Firewall and allow SSH & MySQL Ports | |
ufw enable | |
ufw allow 22 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_deflate.c> | |
<IfModule mod_filter.c> | |
AddOutputFilterByType DEFLATE application/atom+xml \ | |
application/javascript \ | |
application/json \ | |
application/rss+xml \ | |
application/vnd.ms-fontobject \ | |
application/x-font-ttf \ | |
application/x-web-app-manifest+json \ | |
application/xhtml+xml \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash #Se fija a 12 el no de threads máximo (tantos como cores en un nodo) | |
#Se asigna al trabajo el nombre helloomp export OMP_THREAD_LIMIT=12 | |
#PBS -N helloomp echo "No de threads inicial: $OMP_THREAD_LIMIT" | |
#Se asigna al trabajo la cola ac #Se ejecuta HelloOMP, que está en el directorio en el que se ha ejecutado qsub | |
#PBS -q ac for ((P=OMP_THREAD_LIMIT;P>0;P=P/2)) | |
#Se imprime información del trabajo usando variables de entorno de PBS do | |
echo "Id. usuario del trabajo: $PBS_O_LOGNAME" export OMP_NUM_THREADS=$P | |
echo "Id. del trabajo: $PBS_JOBID" echo -e "\nPara $OMP_NUM_THREADS threads:" | |
echo "Nombre del trabajo especificado por usuario: $PBS_JOBNAME" $PBS_O_WORKDIR/HelloOMP | |
echo "Nodo que ejecuta qsub: $PBS_O_HOST" done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imagen i2(filas/reduccion,columnas/reduccion); | |
int fil=filas/reduccion; | |
int col=columnas/reduccion; | |
int med=0; | |
int aux=0; | |
int aux2=0; | |
int auxi=0; | |
int itfil=0; | |
int itcol=0; | |
cout << "Reduccion del tipo " << reduccion << "x"<< endl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for(int i=0; i<fil; i+=reduccion){ | |
for(int j=0; j<col; j+=reduccion){ | |
med = valor_pixel(i,j); | |
for(int f=i; f<i+reduccion; f++){ | |
for(int c=j; c<j+reduccion; c++){ | |
med = med+valor_pixel(f,c); | |
} | |
} | |
med=med/reduccion; | |
if(cont2!=col){ |