Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from ExternalPythonFile import ExternalFunction
- valuelist = []
- for a,b in tuplelist:
- value = ExternalFunction(a,b)
- # more functions here
- valuelist.append(value)
- print(len(valuelist))
- from ExternalPythonFile import ExternalFunction
- from joblib import Parallel, delayed, parallel_backend
- import multiprocessing
- valuelist = []
- def TupleFunction(a,b):
- value = ExternalFunction(a,b)
- # more functions here
- valuelist.append(value)
- with parallel_backend('multiprocessing'):
- Parallel(n_jobs=10)(delayed(TupleFunction)(a,b) for a,b in tuplelist)
- print(len(valuelist))
- srun --ntasks=1 --ncpus-per-task=10 python3 MainFileJoblib.py
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement