Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud
1467 Discussions

max user processes inside jobs too low

fadedmaple
New Contributor I
785 Views

The value of max user processes is only 1024 on all pbsnodes.

 

ulimit -u 
1024

 

Threads count as processes in *unix, so it is not possible to create more than 1024 pthreads, which is such a low limit on such powerful hardware.

A four core VM on other pulbic cloud.

 

ulimit -u
95180

 

 

0 Kudos
10 Replies
fadedmaple
New Contributor I
781 Views

Sorry, I got an error the first time I clicked post and it told me flood, I thought it didn't publish successfully and clicked again

0 Kudos
fadedmaple
New Contributor I
767 Views

 

#include <pthread.h>
#include <stdio.h>
#include <unistd.h>
#define MAXTHREADS 131072
#define THREADSTACK 2097152

static unsigned long long thread_nr = 0;

pthread_mutex_t mutex_;

void* inc_thread_nr(void* arg) {
    (void*)arg;
    pthread_mutex_lock(&mutex_);
    thread_nr ++;
    pthread_mutex_unlock(&mutex_);

    /* printf("thread_nr = %d\n", thread_nr); */

    sleep(60);
}

int main(int argc, char *argv[])
{
    pthread_t       pid[MAXTHREADS];
    pthread_attr_t  attrs;
    int  err, i;
    int  cnt = 0;

    pthread_attr_init(&attrs);
    pthread_attr_setstacksize(&attrs, THREADSTACK);

    pthread_mutex_init(&mutex_, NULL);

    for (cnt = 0; cnt < MAXTHREADS; cnt++) {

        err = pthread_create(&pid[cnt], &attrs, (void*)inc_thread_nr, NULL);
        if (err != 0)
            break;
    }

    pthread_attr_destroy(&attrs);

    for (i = 0; i < cnt; i++)
        pthread_join(pid[i], NULL);

    pthread_mutex_destroy(&mutex_);

    printf("Maximum number of threads per process is %d (%lld)\n", cnt, thread_nr);
}

 

This can be verified by a simple tool. Test on the 64 core 256G  icelake node. qsub -l nodes=1:icx:ppn=2

 

Maximum number of threads per process is 1021 (1021)

 

 

0 Kudos
fadedmaple
New Contributor I
736 Views

No one else has the same need?

0 Kudos
AthiraM_Intel
Moderator
723 Views

Hi,

 

Thanks for posting in Intel communities.

 

Could you please let us know which DevCloud (oneAPI/Edge/FPGA) you are using?

 

 

Thanks.

 

0 Kudos
fadedmaple
New Contributor I
715 Views
0 Kudos
AthiraM_Intel
Moderator
674 Views

Hi,


We are checking on it internally, will get back to you soon with an update.



Thanks


0 Kudos
fadedmaple
New Contributor I
623 Views

Any update? I think this number should be increased to at least 10240

0 Kudos
AthiraM_Intel
Moderator
590 Views

Hi,


Sorry for the delay. We have contacted the concerned team. Could you please let us know your usage scenario so that we can proceed further.



Thanks




0 Kudos
AthiraM_Intel
Moderator
546 Views

Hi,


We have not heard back from you. Could you please let us know your usage scenario?



Thanks


0 Kudos
AthiraM_Intel
Moderator
521 Views

Hi,


We have not heard back from you. This thread will no longer be monitored by Intel. If you need further assistance, please post a new question.



Thanks


0 Kudos
Reply