HPC cluster: select the number of CPUs and threads in SLURM sbatch

Depending on the parallelism you are using: distributed or shared memory –ntasks=# : Number of “tasks” (use with distributed parallelism). –ntasks-per-node=# : Number of “tasks” per node (use with distributed parallelism). –cpus-per-task=# : Number of CPUs allocated to each task (use with shared memory parallelism). From this question: if every node has 24 cores, is … Read more

struct serialization in C and transfer over MPI

Jeremiah is right – MPI_Type_create_struct is the way to go here. It’s important to remember that MPI is a library, not built into the language; so it can’t “see” what a structure looks like to serialize it by itself. So to send complex data types, you have to explicitly define its layout. In a language … Read more

mpiexec vs mpirun

mpiexec is defined in the MPI standard (well, the recent versions at least) and I refer you to those (your favourite search engine will find them for you) for details. mpirun is a command implemented by many MPI implementations. It has never, however, been standardised and there have always been, often subtle, differences between implementations. … Read more

fork: retry: Resource temporarily unavailable [closed]

This is commonly caused by running out of file descriptors. There is the systems total file descriptor limit, what do you get from the command: sysctl fs.file-nr This returns counts of file descriptors: <in_use> <unused_but_allocated> <maximum> To find out what a users file descriptor limit is run the commands: sudo su – <username> ulimit -Hn … Read more

Using MPI_Bcast for MPI communication

This is a common source of confusion for people new to MPI. You don’t use MPI_Recv() to receive data sent by a broadcast; you use MPI_Bcast(). Eg, what you want is this: #include <mpi.h> #include <stdio.h> int main(int argc, char** argv) { int rank; int buf; const int root=0; MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); if(rank == … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)