Skip to content

WIP: Attempt to build on NERSC Perlmutter - #19

Draft
AreWeDreaming wants to merge 4 commits into
iterorganization:SOLPS_developfrom
AreWeDreaming:ssd/nersc_build
Draft

AreWeDreaming wants to merge 4 commits into
iterorganization:SOLPS_developfrom
AreWeDreaming:ssd/nersc_build

Conversation

@AreWeDreaming

Copy link
Copy Markdown

Minor modification to use pkg-config to discover Conda provided json-fortran,

Comment thread config/config.NERSC.gfortran
Comment thread src/CMakeLists.txt Outdated
set(jsonfortran_FOUND TRUE)
else()
message(WARNING "JSON Library libjsonfortran.a NOT found at " ${LibJSON})
message(WARNING "JSON Library ljsonfortran NOT found at " ${LibJSON})

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change the name here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I am linking against ljsonfortran.so (potentially)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the drop of the extension. But you were only looking for the existence of libjsonfortran.a or libjsonfortran.so, not ljsonfortran.

@AreWeDreaming
AreWeDreaming changed the base branch from SOLPS_master to SOLPS_develop September 24, 2026 15:30
Comment thread src/CMakeLists.txt Outdated
@@ -78,7 +97,7 @@ if(LibJSON)
set(LibJSON "${LibJSON}/libjsonfortran.a")

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably split this up so that an existing shared object then leads to forcing the linking against the statically linked library, which conda does not provide.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

else
ifndef SOLPS_CPP
DEFINES += -DNO_JSON
endif

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ifndef SOLPS_CPP basically means "if we are compiling a standa-lone Eirene instance outside the SOLPS environment". There is no reason why it could not also use JSON.

GLI_HOME ?= /global/project/projectdirs/atom/atom-install-cori/solps-libs/lib_gfortran
SOLPSLIB ?= ${SOLPSTOP}/lib/${HOST_NAME}.${COMPILER}
GR_ROOT ?= ${SOLPSLIB}/gr
GLI_HOME ?= ${SOLPSLIB}/gli/src/gks

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as per the comment below. SOLPSLIB will only exist if one is compiling inside a SOLPS environment. But GR and GLI are separate module that come form outside SOLPS-ITER, so they have their own workspace and that is where one should expect to find the libraries.

LD_GR ?= -L${GR_ROOT} -lgr
LD_GKS ?= -L${GLI_HOME} -lgks
LD_NAG ?= -L${SOLPSLIB} -lblas -llapack
LD_GKS ?= -L${SOLPSLIB}/gli/src/gks -lgks

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment above.

Comment thread src/CMakeLists.txt Outdated
@@ -78,7 +97,7 @@ if(LibJSON)
set(LibJSON "${LibJSON}/libjsonfortran.a")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

Comment thread src/CMakeLists.txt Outdated
set(jsonfortran_FOUND TRUE)
else()
message(WARNING "JSON Library libjsonfortran.a NOT found at " ${LibJSON})
message(WARNING "JSON Library ljsonfortran NOT found at " ${LibJSON})

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the drop of the extension. But you were only looking for the existence of libjsonfortran.a or libjsonfortran.so, not ljsonfortran.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants