We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e76998 commit 900dbedCopy full SHA for 900dbed
env/openmp_env
@@ -0,0 +1,10 @@
1
+
2
+# make sure to use only cores. if something is heavy parralelizable probably is also heavy on cpu
3
+export OMP_PLACES=cores
4
+export OMP_PROC_BIND=true
5
6
+NRCORES=$(lscpu -J -e | python3 -c 'import sys,json; j=json.loads(sys.stdin.read()); core_list = [ i["core"] for i in j["cpus"] ]; cset = set(core_list); print(len(cset));' 2>/dev/null)
7
+[[ -z ${NRCORES} ]] && NRCORES="8"
8
9
+export OMP_NUM_THREADS=${NRCORES}
10
0 commit comments