One core used in bash

Wenjun Zhu
Wenjun Zhu Altair Community Member
edited February 2022 in Community Q&A

By checking the .o log file, I see:

image

Does that means only one core is used? causing the solving time is quite long.

if so, what can I do to use all the cores?

My batch file is :

#!/bin/bash
# Request 8 cores in an MPi environment
#$ -pe mpi 8
# Request 256 gigabytes of real memory (RAM) 8 cores *32G = 256
#$ -l rmem=32G


# load the module for the program we want to run
module load apps/altair_flux/binary/2021.2

# Use fixed values for the GUI-memories
export JVM_MEMORY=1000 # In MBytes
export MEMSIZC3=0 # In Bytes
export MEMSIZN3=0 # In Bytes

# This allows multiple instances of Flux
export SYNC_SOCKET=0
#
# --- Making the command line ---
#
# Specify the path to use executable of Flux
PATH_TO_FLUX_EXECUTABLE=/usr/local/packages/apps/altair_flux/2021.2/binary/altair/flux/Flux/Bin/prg/lin64/flux

# Specify the python script to execute
YOUR_PYTHON_SCRIPT=/home/els20wz/Downloads/hpcfluxtest.py
# Get the application of the python extracting its header
FLUX_APP=$(head -n 1 $YOUR_PYTHON_SCRIPT | cut -d ! -f 2 | awk '{$1=$1;print}' | cut -d ' ' -f 1)
# Launch Flux
$PATH_TO_FLUX_EXECUTABLE -application $FLUX_APP -runPyInSilentModeAndExit $YOUR_PYTHON_SCRIPT -batch

Tagged:

Answers

  • Mohammed Elamin_22169
    Mohammed Elamin_22169 New Altair Community Member
    edited February 2022

    Hello, 

    You can use the env variable "FLUX_NCORES=<NCORES>" to set the number of cores you want.  If NCORES=0, Flux will use all the cores available.

    Thanks, 

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.