leap-stc / leap-stc.github.io

LEAP Technical Operations Manual Website
https://leap-stc.github.io/
5 stars 4 forks source link

Compile error for Lagrangian particle tracking on the hub #138

Open NoraLoose opened 5 months ago

NoraLoose commented 5 months ago

Discussed in https://github.com/leap-stc/leap-stc.github.io/discussions/137

Originally posted by **NoraLoose** March 28, 2024 I am trying to do Lagrangian particle tracking with the python package `parcels` on the LEAP pangeo hub, but upon ``` pset.execute( kernel, # the kernel (which defines how particles move) runtime=timedelta(days=359), # the total length of the run dt=timedelta(days=1), # the timestep of the kernel output_file=output_file, ) ``` I get ``` RuntimeError: Error during compilation: Compilation command: ['/srv/conda/envs/notebook/bin/x86_64-conda-linux-gnu-cc', '-Wall', '-fPIC', '-std=gnu11', '-I/srv/conda/envs/notebook/lib/python3.11/site-packages/parcels/include', '-I.', '-g', '-O3', '-DDOUBLE_COORD_VARIABLES', '-m64', '-o', '/tmp/parcels-1000/lib5e10b83c66a2e94be7fac34be5fdd62e_0.so', '/tmp/parcels-1000/5e10b83c66a2e94be7fac34be5fdd62e_0.c', '-shared', '-lm', '-m64'] Source/Destination file: /tmp/parcels-1000/5e10b83c66a2e94be7fac34be5fdd62e_0.c Log file: /tmp/parcels-1000/5e10b83c66a2e94be7fac34be5fdd62e_0.log Log output: /srv/conda/envs/notebook/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: cannot find -lgcc: No such file or directory /srv/conda/envs/notebook/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: cannot find -lgcc: No such file or directory collect2: error: ld returned 1 exit status If you are on macOS, it might help to type 'export CC=gcc' ``` I would have to put a little bit of effort into providing a minimal (reproducible) example. Before doing so, I wanted to hear if anyone has an immediate idea what is going wrong?
jbusecke commented 5 months ago

My bet is that we are missing the gcc compiler in the environment here.

jbusecke commented 5 months ago

How did you install parcels?

NoraLoose commented 5 months ago

Thanks for the quick reply @jbusecke! I actually used the pre-installed Python 3 (ipykernel), which has parcels installed at the location /srv/conda/envs/notebook/lib/python3.11/site-packages.

Also, I have gotten it to work on a different machine/platform. So there is no urgency in digging into this deeper at this point unless another user is having the same issue.

jbusecke commented 4 months ago

I would be generally curious to enable this on the hub. If you want to spend a few cycles on this at some point please ping me.