Skip to content

Error on a slurm cluster: there is insufficient memory for the Java Runtime Environment to continue. #44

Description

@zhong-yy

Hi, I recently used python subprocess and multiprocessing packages to run TauP parallelly on a slurm cluster. There are ~256 cores and 1.5T memory available on the cluster. When the number of allocated cpus is larger than 64, there is always a memory error. However, when I checked the memory usage with top, only about 48G was used and there was plenty of free memory. I have searched for as much information related to java and slurm as I can but still haven't found the solution.

Log

#
# There is insufficient memory for the Java Runtime Environment to continue.
# Cannot create GC thread. Out of system resources.
# Possible reasons:
#   The system is out of physical RAM or swap space
#   In 32 bit mode, the process size limit was hit
# Possible solutions:
#   Reduce memory load on the system
#   Increase physical memory or swap space
#   Check if swap backing store is full
#   Use 64 bit Java on a 64 bit OS
#   Decrease Java heap size (-Xmx/-Xms)
#   Decrease number of Java threads
#   Decrease Java thread stack sizes (-Xss)
#   Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
#  Out of Memory Error (gcTaskThread.cpp:48), pid=1114048, tid=0x00001491cd1ef700
#
# JRE version:  (8.0_172-b11) (build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.172-b11 mixed mode linux-amd64 compressed oops)
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#

Setting of my sbatch script

#!/bin/bash
### job name
#SBATCH -J "taup"
#SBATCH --nodes=1
#SBATCH --ntasks=1

#SBATCH --cpus-per-task=100
#SBATCH --mem-per-cpu=5000M

export JAVA_TOOL_OPTIONS=-Xmx400G
export OPENBLAS_NUM_THREADS=1
export OMP_NUM_THREADS=1
export NUMEXPR_MAX_THREADS=${SLURM_CPUS_PER_TASK}

...

I have tried changing -Xmx using export JAVA_TOOL_OPTIONS=-Xmx128M, but it didn't work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions