BookmarkSubscribeRSS Feed
DougZ
Obsidian | Level 7

One of my quant users is getting this message on a Linux 6/SAS 9.4 (TS1M3) Proc NLMIXED job: 

proc nlmixed data=testda_ft maxiter=800 maxfunc=8000 nthreads=24;

 

and she gets this

    "WARNING:  The NTHREADS= option is ignored due to insufficient memory."  

She ran it from a Putty command line with this: 

/usr/local/SAS/SASFoundation/9.4/sas -work /lppra00a0133/temp/saswork -noterminal scoring_GN30.sas &

 

It loops month by month through the data and I asked her to run 1 month with MPRINT and FULLSTIMER turned on.

Log is attached.

 

 

/*tuning for one category product */
%macro mbspred(product_name, inputsasdb
			, month_reset_min, month_reset_max
			, resetperi_min, resetperi_max
			, orig_term_min, orig_term_max
			, wala_min, wala_max
			, obsdt_bgn, obsdt_end
			, vintage_begin, vintage_end
			, agency_type, product_type, coll_type
			, exclude_mon
			, Parm_inputda_dir, tunParmInFile
			, nlinout_db
			, output_dir
			, nlin_graph_nm, tunParmOutFile, tunSumOutFile
			, model_num, nlin_sum
			);
	%dafilter_ARM( &inputsasdb.,outab=testda_ft
		,mth2reset_min=&month_reset_min. ,  mth2reset_max=&month_reset_max.
		,resetperi_min=&resetperi_min. ,      resetperi_max=&resetperi_max.
		,orig_term_min=&orig_term_min. ,      orig_term_max=&orig_term_max.
		,wala_min=&wala_min. ,           wala_max=&wala_max.
		,obsdt_bgn=&obsdt_bgn.,          obsdt_end=&obsdt_end.
		,vintage_bgn=&vintage_begin. ,     vintage_end=&vintage_end.
		,agency_typ=&agency_type.
		,product_typ=&product_type.
		,coll_typ=&coll_type.
		,exclude_mon=&exclude_mon.
		);

	/*read parameters initial values */
	proc import datafile="&Parm_inputda_dir./&tunParmInFile." out=parmset DBMS=csv REPLACE;
		GETNAMES=YES;
		guessingrows=100;
	RUN;

	data parmset;
		set parmset;
		product="&product_name.";
		Agency=compress("&agency_type.","()'");
		date_begin="&obsdt_bgn."d;
		date_end="&obsdt_end."d;
		run_date=Today();
		run_by="&sysuserid.";
		format date_begin mmddyy10.
			date_end mmddyy10.
			run_date mmddyy10.
		;
	run;

	/*performe nlin tuning */
	%let year_end=%substr(&obsdt_end.,3,7);

	%nlin_ssn(&model_num.,testda_ft,&nlinout_db.,&nlin_sum., parmset, outest_param,"&nlin_graph_nm.","&output_dir.",&product_name.,&obsdt_bgn.,&obsdt_end. );

	proc export data=nlin_parms dbms=csv outfile="&output_dir./&tunParmOutFile." replace;
	run;

%mend;

/*******************************************************************************************************************************************************************/
/*******************************************************************************************************************************************************************/
%macro ProdMBSpred(obsdate_b, obsdate_e, parm_dir, output_dir, inputdb,macroset_csvFile);

	proc import datafile="&parm_dir./&macroset_csvFile." out=macroset DBMS=csv REPLACE;
		GETNAMES=YES;
	RUN;

	data macroset1;
		set macroset;
		macro_ind=_n_;
	run;

	data _null_;
		set macroset1 end=last;

		if last then
			call symput('N', put (macro_ind,3.));
	run;

	%do i=1 %to &N.;

		proc sql noprint;
			select
				strip(macroVar_name), macroVar_value
			into : this_macro_name , : this_macro_value
				from macroset1 where macro_ind=&i;
		quit;

		data _null_;
			call symput(strip("&this_macro_name."),strip("&this_macro_value."));
		run;

	%end;

	%let year_end=%substr(&obsdate_e.,3,7);

	/*add some prefix to some macro variables */
	%let TunParm_inFile=%cmpres(&TunParmInFile.);
	%let TunParm_outFile=%cmpres(&year_end._&product_nm._&TunParmoutFile.);
	%let nlinout_dtbase=%cmpres(&nlinout_db._&product_nm._&year_end.);
	%let nlinsum_dtbase=%cmpres(&nlin_sum._&product_nm._&year_end.);
	%let TunSum_outFile=%cmpres(&year_end._&product_nm._&tunSumOutFile.);
	%let Nlingraph_nm=%cmpres(&year_end._&product_nm._&nlin_graph_nm.);
	%put &product_nm.>>> &nlinsum_dtbase.>>>&tunParm_outFile. >>>> &nlinout_dtbase. >>>>> &TunSum_outFile. >>>> &Nlingraph_nm.;

	%mbspred(product_name=&product_nm.,             inputsasdb= &inputdb.
		,month_reset_min=&month_reset_min. , month_reset_max=&month_reset_max.
		,resetperi_min=&firstResetAge_min. , resetperi_max=&firstResetAge_max.
		,orig_term_min=&orig_term_min. ,     orig_term_max=&orig_term_max.
		,wala_min=&wala_min. ,               wala_max=&wala_max.
		,obsdt_bgn=&obsdate_b.,          obsdt_end=&obsdate_e.
		,vintage_begin=&vintage_begin. ,     vintage_end=&vintage_end.
		,agency_type=&agency_type.,          product_type=&product_type.,        coll_type=&coll_type.
		,exclude_mon=&exclude_month.
		,Parm_inputda_dir=&parm_dir.,            tunParmInFile=&tunParm_InFile.
		,nlinout_db=&nlinout_dtbase.
		,output_dir=&output_dir.
		,nlin_graph_nm=&nlingraph_nm.,      tunParmOutFile=&tunParm_OutFile.,      tunSumOutFile=&tunSum_OutFile.
		,model_num=&ModelNum., nlin_sum=&nlinsum_dtbase.
		);

	proc datasets lib=work;
		delete macroset macroset1;
	run;

%mend;

/*******************************************************************************************************************************************************************/

**** DRIVER PGM BELOW ****; /*********************************************************************************************************************************/ /******* *******/ /******* Description: This program use csv files from BRI then conduct optimization tuning and output the result to excel file *******/ /******* *******/ /******* *******/ /******* Change log: first version 4/18/2017 Huibin Cheng *******/ /******* *******/ /********* second version 06/11/2018 by Haisu Ma ****************/ /**/ ;;;; %let codedir=/lppra00a0133/data/dev/haisu/ginnie_plpm/run18; %let inputda_dir=/lppra00a0133/data/dev/haisu/ginnie_plpm; %let parm_dir=/lppra00a0133/data/dev/haisu/ginnie_plpm/run18; %let outputda_dir=/lppra00a0133/data/dev/haisu/ginnie_plpm/run18; libname sasdb "&inputda_dir."; libname outdb "&outputda_dir."; %include "&codedir./Macro_hm_bspline_GN30_server_poisson.sas"; %let date_begin=31JAN2012; %let date_end=31JAN2019; %let fix30_inputsasdb=sasdb.est_gnma30; %let fix30GNSetCsv=PLPM_GN30_Setting.csv; /*for model 1, no seasing, only tune refinance */ %macro full_run(n_runs,obs_begin,obs_end); %do run = 1 %to &n_runs.; %put running cycle &run.; %let obs_b=%sysfunc(intnx(month,"&obs_begin."D,%eval((&run.-1)*3),e),date9.); %let obs_e=%sysfunc(intnx(month,"&obs_end."D,%eval((&run.-1)*3),e),date9.); %put &obs_b. &obs_e.; %ProdMBSpred(obsdate_b=&obs_b., obsdate_e=&obs_e., parm_dir=&parm_dir.,output_dir=&outputda_dir., inputdb=&fix30_inputsasdb.,macroset_csvFile=&fix30GNSetCsv.); %end; %mend; %full_run(1,&date_begin.,&date_end.);

 

 

1 REPLY 1
DougZ
Obsidian | Level 7

One correction to my post: I mis-pasted the Linux command line SAS call;  it should read, 

 

    /usr/local/SAS/SASFoundation/9.4/sas -work /lppra00a0133/temp/saswork -noterminal -memsize=max Est_Bspline_GN30_server.sas &

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 665 views
  • 0 likes
  • 1 in conversation