This file contains 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
char* create_string_buffer(unsigned number_of_strings, unsigned max_string_length) | |
{ | |
return (char*) malloc(number_of_strings*max_string_length); | |
} | |
void copy_string_into_buffer(char* buffer, unsigned index, unsigned max_string_length, char* string) | |
{ | |
strncpy(buffer + (max_string_length*index), string, max_string_length); | |
} |
This file contains 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
#include <stdio.h> | |
#include <assert.h> | |
#include <unistd.h> | |
#define CALL(f) assert(0==(f)) | |
#define PCALL(f) assert(NULL!=(f)) | |
#define BUFFER_SIZE 256 | |
//this program copies dir1/filename to dir2/filename |
This file contains 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
#include <stdio.h> | |
#include <fitsio.h> | |
#include <dirent.h> | |
#include <string.h> | |
#include <mpi.h> | |
/*If status != 0, report the error and return 1.*/ | |
#define FITS_ERROR_CHECK if(status){fits_report_error(stdout, status); return 1;} | |
int countNumFits(int limit, char * dir); |
This file contains 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
#include<stdio.h> | |
#include<string.h> | |
void p(const char*c,int d) | |
{ | |
for(;d;++c,--d) | |
putchar(*c); | |
} | |
void q(const char*c,int d) | |
{ | |
for(;d;++c,--d) |
This file contains 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
/* This program should be run on a single Blue Gene/Q node | |
using 5 or more parallel processes and 8 threads per process | |
(threads per process is the only argument to the program) | |
mpirun -np 5 ./deadlock 8 | |
It has a high probability of going into a deadlocked state | |
(or at least timing out at 5~10 minutes). | |
The probability increases as LOOPS is increased */ | |
#include <mpi.h> | |
#include <pthread.h> |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <ctype.h> | |
#include <termios.h> | |
#include <unistd.h> | |
#define SIZE 4 | |
struct game { | |
int tiles[SIZE][SIZE]; |
This file contains 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
#include <apfMesh.h> | |
#include <apfNumbering.h> | |
#include <PCU.h> | |
static int getOrientationCode( | |
int side_i, | |
long* verts, | |
int other_side_i, | |
long* other_verts) | |
{ |
This file contains 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/sh | |
#SBATCH --job-name=make1B | |
#SBATCH -t 02:00:00 | |
## are we in fact able to do this with 16 ranks per node ? | |
#SBATCH -N 64 | |
#SBATCH -n 1024 | |
#SBATCH --partition small | |
#SBATCH -D /gpfs/u/scratch/PGES/PGESzhnl/Test/10x10/mesh | |
set +xe | |
EXE_DIR=/gpfs/u/home/PGES/PGESgnzw/scratch/core/build/test |
This file contains 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
#include <apf.h> | |
#include <gmi_null.h> | |
#include <apfMDS.h> | |
#include <apfMesh2.h> | |
#include <PCU.h> | |
#include <apfNumbering.h> | |
#include <apfShape.h> | |
#include <iostream> | |
#include <stdbool.h> |
This file contains 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
#!/home/dibanez/install/ParaView-5.1.0-Qt4-OpenGL2-MPI-Linux-64bit/bin/pvpython | |
import sys | |
from paraview import simple | |
reader = simple.OpenDataFile(sys.argv[1]) | |
writer = simple.CreateWriter("copied.vtu", reader) | |
writer.DataMode = "Ascii" | |
writer.UpdatePipeline() |
OlderNewer