hpc

mpirun - not enough slots available

懵懂的女人 提交于 2019-11-30 16:28:01
问题 Usually when I use mpirun, I can "overload" it, using more processors than there acctually are on my computer. For example, on my four-core mac, I can run mpirun -np 29 python -c "print 'hey'" no problem. I'm on another machine now, which is throwing the following error: $ mpirun -np 25 python -c "print 'hey'" -------------------------------------------------------------------------- There are not enough slots available in the system to satisfy the 25 slots that were requested by the

GNU parallel --jobs option using multiple nodes on cluster with multiple cpus per node

吃可爱长大的小学妹 提交于 2019-11-30 09:25:21
I am using gnu parallel to launch code on a high performance (HPC) computing cluster that has 2 CPUs per node. The cluster uses TORQUE portable batch system (PBS). My question is to clarify how the --jobs option for GNU parallel works in this scenario. When I run a PBS script calling GNU parallel without the --jobs option, like this: #PBS -lnodes=2:ppn=2 ... parallel --env $PBS_O_WORKDIR --sshloginfile $PBS_NODEFILE \ matlab -nodiplay -r "\"cd $PBS_O_WORKDIR,primes1({})\"" ::: 10 20 30 40 it looks like it only uses one CPU per core, and also provides the following error stream: bash: parallel:

Why can't my CPU maintain peak performance in HPC

删除回忆录丶 提交于 2019-11-30 07:06:33
I have developed a high performance Cholesky factorization routine, which should have peak performance at around 10.5 GFLOPs on a single CPU (without hyperthreading). But there is some phenomenon which I don't understand when I test its performance. In my experiment, I measured the performance with increasing matrix dimension N, from 250 up to 10000. In my algorithm I have applied caching (with tuned blocking factor), and data are always accessed with unit stride during computation, so cache performance is optimal; TLB and paging problem are eliminated; I have 8GB available RAM, and the

Use slurm job id

僤鯓⒐⒋嵵緔 提交于 2019-11-30 00:18:42
When I launch a computation on the cluster, I usually have a separate program doing the post-processing at the end : sbatch simulation sbatch --dependency=afterok:JOBIDHERE postprocessing I want to avoid mistyping and automatically have the good job id inserted. Any idea? Thanks You can do something like this: RES=$(sbatch simulation) && sbatch --dependency=afterok:${RES##* } postprocessing The RES variable will hold the result of the sbatch command, something like Submitted batch job 102045 . The construct ${RES##* } isolates the last word (see more info here ), in the current case the job id

GNU parallel --jobs option using multiple nodes on cluster with multiple cpus per node

痴心易碎 提交于 2019-11-29 14:21:00
问题 I am using gnu parallel to launch code on a high performance (HPC) computing cluster that has 2 CPUs per node. The cluster uses TORQUE portable batch system (PBS). My question is to clarify how the --jobs option for GNU parallel works in this scenario. When I run a PBS script calling GNU parallel without the --jobs option, like this: #PBS -lnodes=2:ppn=2 ... parallel --env $PBS_O_WORKDIR --sshloginfile $PBS_NODEFILE \ matlab -nodiplay -r "\"cd $PBS_O_WORKDIR,primes1({})\"" ::: 10 20 30 40 it

Containerize a conda environment in a Singularity container

纵然是瞬间 提交于 2019-11-29 10:17:02
问题 I've come across several instances where it would be really helpful to containerize a conda environment for long-term reproducibility. As I'm normally running in high-performance computing systems, they need to be Singularity containers for security reasons. How can this be done? 回答1: First, you'll want to get the environment YML for your particular conda environment. conda activate your_env conda env export > environment.yml Normally, you would just use this as follows: conda env create -f

Why can't my CPU maintain peak performance in HPC

强颜欢笑 提交于 2019-11-29 09:11:48
问题 I have developed a high performance Cholesky factorization routine, which should have peak performance at around 10.5 GFLOPs on a single CPU (without hyperthreading). But there is some phenomenon which I don't understand when I test its performance. In my experiment, I measured the performance with increasing matrix dimension N, from 250 up to 10000. In my algorithm I have applied caching (with tuned blocking factor), and data are always accessed with unit stride during computation, so cache

How to run a job array in R using the rscript command from the command line? [closed]

雨燕双飞 提交于 2019-11-29 08:56:54
I am wondering how I might be able to run 500 parallel jobs in R using the Rscript function. I currently have an R file that has the header on top: args <- commandArgs(TRUE) B <- as.numeric(args[1]) Num.Cores <- as.numeric(args[2]) Outside of the R file, I wish to pass which of the 500 jobs are to be run, which is specified by B . Also, I would like to control the number of cores/CPUs available to each job, Num.Cores . I am wondering if there is software or guides that can allow this. I currently have a CentOS 7/Linux server and I know one way is to install Slurm. However, it is quite a hassle

openmp - while loop for text file reading and using a pipeline

做~自己de王妃 提交于 2019-11-29 00:47:36
I discovered that openmp doesn't support while loops( or at least doesn't like them too much). And also doesn't like the ' != ' operator. I have this bit of code. int count = 1; #pragma omp parallel for while ( fgets(buff, BUFF_SIZE, f) != NULL ) { len = strlen(buff); int sequence_counter = segment_read(buff,len,count); if (sequence_counter == 1) { count_of_reads++; printf("\n Total No. of reads: %d \n",count_of_reads); } count++; } Any clues as to how to manage this ? I read somewhere ( another post on stackoverflow included) that I can use a pipeline. What is that ? and how to implement it ?

GCC SSE code optimization

只愿长相守 提交于 2019-11-28 05:31:30
This post is closely related to another one I posted some days ago . This time, I wrote a simple code that just adds a pair of arrays of elements, multiplies the result by the values in another array and stores it in a forth array, all variables floating point double precision typed. I made two versions of that code: one with SSE instructions, using calls to and another one without them I then compiled them with gcc and -O0 optimization level. I write them below: // SSE VERSION #define N 10000 #define NTIMES 100000 #include <time.h> #include <stdio.h> #include <xmmintrin.h> #include <pmmintrin