Healpix routines not found, GDL

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Evan B
Posts: 13
Joined: February 27 2015
Affiliation: student

Healpix routines not found, GDL

Post by Evan B » September 14 2015

I simply don't understand. I have used

Code: Select all

/.configure
and

Code: Select all

make
for IDL routines in the Terminal.

Using a bash terminal, I have set the GDL_PATH and GDL_STARTUP in the file ~/.bash_profile:

Code: Select all

export GDL_PATH="/Users/myname/downloads/HEALPix_3.20/src/idl/&#58;/opt/local/share/gnudatalanguage/lib&#58;<IDL_DEFAULT>"

export GDL_STARTUP="/Users/myname/downloads/Healpix_3.20/src/idl/HEALPix_startup"

export HEALPIX="/Users/myname/downloads/Healpix_3.20/"
After running /.configure, the files "config" and "idl.sh" are created in

Code: Select all

/Users/myname/.healpix/3_20_Darwin
I have changed all "IDL" into "GDL".


Still, when I now run `gdl`, I get:

Code: Select all

  GDL - GNU Data Language, Version 0.9.5

- For basic information type HELP,/INFO
- Please report bugs, feature or help requests and patches at&#58;
  http&#58;//sourceforge.net/projects/gnudatalanguage/

% Parser syntax error&#58; unexpected token&#58; 

% Compiled module&#58; PATH_SEP.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!  WARNING&#58; the Healpix routines are currently NOT found  !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
What am I doing wrong? Within GDL, if I use the command "print, !PATH'

Code: Select all

HIDL> print, !PATH
I get

Code: Select all

&#58;/Users/myname/downloads/HEALPix_3.20/src/idl/&#58;/opt/local/share/gnudatalanguage/lib/dicom&#58;/opt/local/share/gnudatalanguage/lib/envi&#58;/opt/local/share/gnudatalanguage/lib
Surely the Healpix routines are there.

Evan B
Posts: 13
Joined: February 27 2015
Affiliation: student

Healpix routines not found, GDL

Post by Evan B » September 14 2015

I *finally* think I found out the problem. As far as I can tell, this is genuinely a bug:

When I originally set the path as directed, I set this as

Code: Select all

HEALPix_path='/Users/myname/downloads/Healpix_3.20/src/idl'
!path=expand_path&#40;HEALPix_path&#41;
The HEALPix start in subdirectory ~/downloads/Healpix_3.20/src/idl, named "HEALPix_startup"

This file checks whether 'init_healpix.pro' exists.

Code: Select all

; compile routines
;
; check that init_healpix is accessible
pathtab = expand_path&#40;!path,/array&#41;
junk = file_search&#40;pathtab+path_sep&#40;&#41;+'init_healpix.pro', count=count&#41;

It then runs an IF loop to see whether count is 1 (i.e. the routine is found) or count is 0 (i.e. the routine is not found).

If not found, I get the error message above, i.e.

Code: Select all

% Compiled module&#58; PATH_SEP. 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
!  WARNING&#58; the Healpix routines are currently NOT found  ! 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
The `init_healpix.pro` routine is found in '/Users/myname/downloads/Healpix_3.20/src/idl/misc`. Therefore, you must set the path to this specific subdirectory.

This may be a problem. If I were to move all IDL routines into one location, it could be that some do not run correctly.

Eric Hivon
Posts: 7
Joined: September 25 2004
Affiliation: IAP

Healpix routines not found, GDL

Post by Eric Hivon » September 14 2015

Hi Evan,

It looks like you forgot in the path definition the leading + signs that make a huge difference for the expand_path command.

Therefore

Code: Select all

export GDL_PATH="/Users/myname/downloads/HEALPix_3.20/src/idl/&#58;/opt/local/share/gnudatalanguage/lib&#58;<IDL_DEFAULT>"
should be

Code: Select all

export GDL_PATH="+/Users/myname/downloads/HEALPix_3.20/src/idl/&#58;+/opt/local/share/gnudatalanguage/lib&#58;<IDL_DEFAULT>"
as shown on http://healpix.sourceforge.net/html/idl ... 0000000000
and in the automatically generated idl.sh and idl.csh scripts.

Cheers,
Eric

Evan B
Posts: 13
Joined: February 27 2015
Affiliation: student

Healpix routines not found, GDL

Post by Evan B » September 14 2015

Dr. Hivon,

You are of course correct. Silly mistake on my part. Thank you for the help!

My error was that for GDL_STARTUP, one cannot include the plus +, i.e.

Code: Select all

export GDL_STARTUP="/Users/myname/downloads/Healpix_3.20/src/idl/HEALPix_startup"
but for GDL_PATH you should include the plus +, i.e.

Code: Select all

export GDL_PATH="+/Users/myname/downloads/HEALPix_3.20/src/idl/&#58;+/opt/local/share/gnudatalanguage/lib&#58;<IDL_DEFAULT>"

Post Reply