I am trying to learn parallel programming following this article :
I try to assign the client library to the same location as my server work library so that I can access the files in the server work library in every subtasks.
The problem is that although %sysfunc(pathname(work)) reports the path of the work library, (C:\Users\Admins\AppData\Local\Temp\SAS Temporary Files\_TD6236_ADMIN-1070205A_), my datasets in the work library is not actually there since I use the in-memory work library (MEMLIB).
Could you please help me find the location of my in-memory work library? Or is there any other suggestion for my problem? Thank you very much.
Here is my code:
libname shared "%sysfunc(pathname(work))";
data pt; /*generate sample dataset*/
do pt=1 to &numPt;
gender = ifc(uniform(&seed) > .45, 'M', 'F');
run; rsubmit task1 wait=no inheritlib=(shared); /*use inheritlib to set shared to the server work library*/
set shared.pt; /* <-- ERROR: File SHARED.PT.DATA does not exist. */
I have also tried to share an in-memory library other than the WORK library. It does not work either. I get the same error for the following code. Howerver, the code wroks fine without the MEMLIB option.
Here is my full code.
libname shared "D:\Research\Parallel Data" MEMLIB; data shared.pt; /*generate sample dataset*/ do pt=1 to 1000; gender = ifc(uniform(123) > .45, 'M', 'F'); output; end; run; %let rc=%sysfunc(grdsvc_enable(_all_, resource=SASApp)); options autosignon; rsubmit task1 wait=no inheritlib=(shared); data shared.task1; set shared.pt; run; waitfor _all_ task1; endrsubmit;
Try repeating your libname statement in the RSUBMIT block. Also test without MEMLIB - does that work?
I'm not sure if you can share MEMLIB libraries across SAS sessions. This link says a MEMLIB library is lost at the end of a SAS session:
I suggest you track this to SAS Tech Support for a definitive answer.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.