Import original
Removed preprocessor instructions
Got working better in the EC environment, had to change to s.compile
Re-organized to get working with EC environment and Linux env (with PGI)